Trait serror::AddStatusCode

source ·
pub trait AddStatusCode<T, E>: Into<Result<T, E>>
where E: Into<Error>,
{ // Provided method fn status_code(self, status_code: StatusCode) -> Result<T> { ... } }
Expand description

Convenience trait to convert Result into serror::Result by adding status to the inner error, if it exists.

Provided Methods§

source

fn status_code(self, status_code: StatusCode) -> Result<T>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<R, T, E> AddStatusCode<T, E> for R
where R: Into<Result<T, E>>, E: Into<Error>,