Trait graphql_starter::error::MapToErr
source · pub trait MapToErr<T> {
// Required methods
fn map_to_internal_err(self, reason: impl Into<String>) -> Result<T>;
fn map_to_err(
self,
code: impl ErrorInfo + Send + Sync + 'static,
reason: impl Into<String>,
) -> Result<T>;
}
Expand description
Utility trait to map any Result<T,E>
to a Result<T, Box<Error>>
Required Methods§
sourcefn map_to_internal_err(self, reason: impl Into<String>) -> Result<T>
fn map_to_internal_err(self, reason: impl Into<String>) -> Result<T>
Maps the error to an internal server error
Object Safety§
This trait is not object safe.