[−][src]Trait libimagerror::trace::MapErrTrace
Helper functions for Result<T, E>
types to reduce overhead in the following situations:
ⓘThis example is not tested
function().map_err(|e| { trace_error(&e); e })
and variants
Associated Types
type Output
Required methods
fn map_err_trace(self) -> Self
fn map_err_trace_exit_unwrap(self) -> Self::Output
Implementations on Foreign Types
impl<U> MapErrTrace for Result<U, Error>
[src]
type Output = U
fn map_err_trace(self) -> Self
[src]
Simply call trace_error()
on the Err (if there is one) and return the error.
This does nothing besides the side effect of printing the error trace
fn map_err_trace_exit_unwrap(self) -> Self::Output
[src]
Trace the error and exit or unwrap the Ok(_).