[][src]Struct uefi::Completion

#[must_use]pub struct Completion<T> { /* fields omitted */ }

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]

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]

impl<T> StructuralPartialEq for Completion<T>[src]

Auto Trait Implementations

impl<T> Send for Completion<T> where
    T: Send

impl<T> Sync for Completion<T> where
    T: Sync

impl<T> Unpin for Completion<T> where
    T: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[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]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.