pub struct NvramResult<T>(pub T, pub EfiStatus, pub Option<NvramError>);
Expand description
Unlike a typical result type, NvramErrors contain both a payload and an
error code. Depending on the error code, an optional NvramError
might be
included as well, which provides more context.
Notably, this result types cannot be propagated via the ?
operator!
Tuple Fields§
§0: T
§1: EfiStatus
§2: Option<NvramError>
Implementations§
Source§impl<T> NvramResult<T>
impl<T> NvramResult<T>
pub fn is_success(&self) -> bool
Trait Implementations§
Source§impl<T: Debug> Debug for NvramResult<T>
impl<T: Debug> Debug for NvramResult<T>
Source§impl<T> Display for NvramResult<T>
impl<T> Display for NvramResult<T>
Source§impl<T> Error for NvramResult<T>where
T: Debug,
impl<T> Error for NvramResult<T>where
T: Debug,
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl<T> Freeze for NvramResult<T>where
T: Freeze,
impl<T> !RefUnwindSafe for NvramResult<T>
impl<T> Send for NvramResult<T>where
T: Send,
impl<T> Sync for NvramResult<T>where
T: Sync,
impl<T> Unpin for NvramResult<T>where
T: Unpin,
impl<T> !UnwindSafe for NvramResult<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more