Struct uefi::Completion [−][src]
#[must_use]pub struct Completion<T> { /* fields omitted */ }
Expand description
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]
impl<T> Completion<T>
[src]pub fn new(status: Status, result: T) -> Self
[src]
pub fn new(status: Status, result: T) -> Self
[src]Build a completion from a non-error status and a function result
pub fn expect(self, msg: &str) -> T
[src]
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]
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]
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: Clone> Clone for Completion<T>
[src]fn clone(&self) -> Completion<T>
[src]
fn clone(&self) -> Completion<T>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl<T: Debug> Debug for Completion<T>
[src]
impl<T: Debug> Debug for Completion<T>
[src]impl From<Status> for Completion<()>
[src]
impl From<Status> for Completion<()>
[src]impl<T> From<T> for Completion<T>
[src]
impl<T> From<T> for Completion<T>
[src]impl<T: PartialEq> PartialEq<Completion<T>> for Completion<T>
[src]
impl<T: PartialEq> PartialEq<Completion<T>> for Completion<T>
[src]fn eq(&self, other: &Completion<T>) -> bool
[src]
fn eq(&self, other: &Completion<T>) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &Completion<T>) -> bool
[src]
fn ne(&self, other: &Completion<T>) -> bool
[src]This method tests for !=
.
impl<T: Copy> Copy for Completion<T>
[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,