[−][src]Struct uefi::Completion
This type is used when an UEFI operation has completed, but some non-fatal problems (UEFI warnings) may have been encountered along the way
Implementations
impl<T> Completion<T>
[src]
pub fn new(status: Status, result: T) -> Self
[src]
Build a completion from a non-error status and a function result
pub fn status(&self) -> Status
[src]
Extract the status of this completion
pub fn split(self) -> (Status, T)
[src]
Split this completion into its inner status and result data
pub fn log(self) -> T
[src]
Access the inner value, logging the warning if there is any
pub fn unwrap(self) -> T
[src]
Assume that no warning occured, panic if not
pub fn expect(self, msg: &str) -> T
[src]
Assume that no warning occured, panic with provided message if not
pub fn map<U>(self, f: impl FnOnce(T) -> U) -> Completion<U>
[src]
Transform the inner value without unwrapping the Completion
pub fn with_status(self, extra_status: Status) -> Self
[src]
Merge this completion with a success or warning status
Since this type only has storage for one warning, if two warnings must be stored, one of them will be spilled into the logs.
Trait Implementations
impl<T: Clone> Clone for Completion<T>
[src]
fn clone(&self) -> Completion<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Copy> Copy for Completion<T>
[src]
impl<T: Debug> Debug for Completion<T>
[src]
impl From<Status> for Completion<()>
[src]
impl<T> From<T> for Completion<T>
[src]
impl<T: PartialEq> PartialEq<Completion<T>> for Completion<T>
[src]
fn eq(&self, other: &Completion<T>) -> bool
[src]
fn ne(&self, other: &Completion<T>) -> bool
[src]
impl<T> StructuralPartialEq for Completion<T>
[src]
Auto Trait Implementations
impl<T> Send for Completion<T> where
T: Send,
T: Send,
impl<T> Sync for Completion<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Completion<T> where
T: Unpin,
T: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,