[−][src]Trait uefi::prelude::ResultExt
Extension trait for Result which helps dealing with UEFI's warnings
Required methods
fn status(&self) -> Status
Extract the UEFI status from this result
fn log_warning(self) -> Result<Output, Error<ErrData>>
Ignore warnings, keeping a trace of them in the logs
fn unwrap_success(self) -> Output
Expect success without warnings, panic otherwise
fn expect_success(self, msg: &str) -> Output
Expect success without warnings, panic with provided message otherwise
fn expect_error(self, msg: &str) -> Error<ErrData>
Expect error, panic with provided message otherwise, discarding output
fn map_inner<Mapped>(
self,
f: impl FnOnce(Output) -> Mapped
) -> Result<Mapped, ErrData>
self,
f: impl FnOnce(Output) -> Mapped
) -> Result<Mapped, ErrData>
Transform the inner output, if any
fn discard_errdata(self) -> Result<Output>
Transform the ErrData value to ()
fn warning_as_error(self) -> Result<Output, Error<ErrData>> where
ErrData: Default,
ErrData: Default,
Treat warnings as errors
Implementors
impl<Output, ErrData: Debug> ResultExt<Output, ErrData> for Result<Output, ErrData>
[src]
fn status(&self) -> Status
[src]
fn log_warning(self) -> Result<Output, Error<ErrData>>
[src]
fn unwrap_success(self) -> Output
[src]
fn expect_success(self, msg: &str) -> Output
[src]
fn expect_error(self, msg: &str) -> Error<ErrData>
[src]
fn map_inner<Mapped>(
self,
f: impl FnOnce(Output) -> Mapped
) -> Result<Mapped, ErrData>
[src]
self,
f: impl FnOnce(Output) -> Mapped
) -> Result<Mapped, ErrData>
fn discard_errdata(self) -> Result<Output>
[src]
fn warning_as_error(self) -> Result<Output, Error<ErrData>> where
ErrData: Default,
[src]
ErrData: Default,