Trait ore::result::ResultExt [−][src]
pub trait ResultExt<T, E> {
fn err_into<E2>(self) -> Result<T, E2>
where
E: Into<E2>;
fn err_to_string(&self) -> Option<String>
where
E: Display;
fn map_err_to_string(self) -> Result<T, String>
where
E: Display;
}Expand description
Extension methods for std::result::Result.
Required methods
Applies Into::into to a contained Err value, leaving an Ok
value untouched.
fn err_to_string(&self) -> Option<String> where
E: Display,
fn err_to_string(&self) -> Option<String> where
E: Display,
Formats an Err value as a detailed error message, preserving any context information.
This is equivalent to format!("{:#}", err), except that it’s easier to type.