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.

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.

Maps a Result<T, E> to Result<T, String> by converting the Err result into a string using the “alternate” formatting.

Implementations on Foreign Types

Implementors