[−][src]Trait tide::ResultExt
Extension methods for Result
.
Required methods
fn with_err_status<S>(self, status: S) -> Result<T> where
StatusCode: HttpTryFrom<S>,
StatusCode: HttpTryFrom<S>,
Convert to an Result
, wrapping the Err
case with a custom
response status.
Provided methods
fn client_err(self) -> Result<T>
Convert to an Result
, treating the Err
case as a client
error (response code 400).
fn server_err(self) -> Result<T>
Convert to an Result
, 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) -> Result<T> where
StatusCode: HttpTryFrom<S>,
[src]
StatusCode: HttpTryFrom<S>,