[−][src]Trait tide::error::ResultExt
Extends the Result
type with convenient methods for constructing Tide errors.
Required methods
fn with_err_status<S>(self, status: S) -> EndpointResult<T> where
StatusCode: HttpTryFrom<S>,
StatusCode: HttpTryFrom<S>,
Convert to an EndpointResult
, wrapping the Err
case with a custom
response status.
Provided methods
fn client_err(self) -> EndpointResult<T>
Convert to an EndpointResult
, treating the Err
case as a client
error (response code 400).
fn server_err(self) -> EndpointResult<T>
Convert to an EndpointResult
, treating the Err
case as a server
error (response code 500).
Implementations on Foreign Types
impl<T, E: Error + Send + Sync + 'static> ResultExt<T> for Result<T, E>
[src]
fn with_err_status<S>(self, status: S) -> EndpointResult<T> where
StatusCode: HttpTryFrom<S>,
[src]
StatusCode: HttpTryFrom<S>,