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