Type Definition uefi::Result[][src]

type Result<Output = (), ErrData = ()> = Result<Completion<Output>, Error<ErrData>>;
Expand description

Return type of most UEFI functions. Both success and error payloads are optional.

Trait Implementations

impl From<Status> for Result<(), ()>[src]

fn from(status: Status) -> Result<(), ()>[src]

Performs the conversion.

impl<Output, ErrData: Debug> ResultExt<Output, ErrData> for Result<Output, ErrData>[src]

fn status(&self) -> Status[src]

Extract the UEFI status from this result

fn log_warning(self) -> Result<Output, Error<ErrData>>[src]

Ignore warnings, keeping a trace of them in the logs

fn unwrap_success(self) -> Output[src]

Expect success without warnings, panic otherwise

fn expect_success(self, msg: &str) -> Output[src]

Expect success without warnings, panic with provided message otherwise

fn expect_error(self, msg: &str) -> Error<ErrData>[src]

Expect error, panic with provided message otherwise, discarding output

fn map_inner<Mapped>(
    self,
    f: impl FnOnce(Output) -> Mapped
) -> Result<Mapped, ErrData>
[src]

Transform the inner output, if any

fn discard_errdata(self) -> Result<Output>[src]

Transform the ErrData value to ()

fn warning_as_error(self) -> Result<Output, Error<ErrData>> where
    ErrData: Default
[src]

Treat warnings as errors