Type Alias graphql_starter::error::Result

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

Aliased Type§

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: impl Into<String>) -> Result<T>

Maps the error to an internal server error
source§

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

Maps the error to the given one
source§

impl<T> ResultExt for Result<T>

source§

fn with_property(self, key: &str, value: Value) -> Self

Appends a property to the error side of the result
source§

fn with_str_property(self, key: &str, value: impl Into<String>) -> Self
where Self: Sized,

Appends an string property to the error side of the result