Type Alias Result

Source
pub type Result<T, E = Box<Error>> = Result<T, E>;

Aliased Type§

pub enum Result<T, E = Box<Error>> {
    Ok(T),
    Err(E),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(E)

Contains the error value

Trait Implementations§

Source§

impl<T, E: Display + Send + Sync + 'static> MapToErr<T> for Result<T, E>

Source§

fn map_to_internal_err(self, reason: &'static str) -> Result<T>

Maps the error to an internal server error
Source§

fn map_to_err(self, code: impl ErrorInfo + Send + Sync + 'static) -> Result<T>

Maps the error to the given one
Source§

fn map_to_err_with( self, code: impl ErrorInfo + Send + Sync + 'static, reason: &'static str, ) -> Result<T>

Maps the error to the given one with a reason
Source§

impl<T> ResultExt for Result<T>

Source§

fn unexpected(self) -> Self

Marks the error side of the result as unexpected
Source§

fn expected(self) -> Self

Marks the error side of the result as expected
Source§

fn with_str_property(self, key: &'static str, value: &'static str) -> Self

Appends an string property to the error side of the result