[−][src]Struct uefi::Completion
This type is used when an UEFI operation has completed, but some non-fatal problems may have been encountered along the way
Methods
impl<T> Completion<T>
[src]
pub fn new(status: Status, result: T) -> Self
[src]
Build a completion from a non-warning 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 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: Debug> Debug for Completion<T>
[src]
impl<T: Copy> Copy for Completion<T>
[src]
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]
Auto Trait Implementations
impl<T> Unpin for Completion<T> where
T: Unpin,
T: Unpin,
impl<T> Send for Completion<T> where
T: Send,
T: Send,
impl<T> Sync for Completion<T> where
T: Sync,
T: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
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> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,