Struct salvo::http::errors::HttpError [−][src]
pub struct HttpError {
pub code: StatusCode,
pub name: String,
pub summary: Option<String>,
pub detail: Option<String>,
}
Expand description
HttpError contains http error information.
Fields
code: StatusCode
Http error status code.
name: String
Http error name.
summary: Option<String>
Summary information about http error.
detail: Option<String>
Detail information about http error.
Implementations
Set summary field and returns Self.
Set detail field and returns Self.
Trait Implementations
pub fn write<'life0, 'life1, 'life2, 'async_trait>(
self,
req: &'life0 mut Request,
_depot: &'life1 mut Depot,
res: &'life2 mut Response
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
HttpError: 'async_trait,
pub fn write<'life0, 'life1, 'life2, 'async_trait>(
self,
req: &'life0 mut Request,
_depot: &'life1 mut Depot,
res: &'life2 mut Response
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
HttpError: 'async_trait,
Write data to Respone
.
Auto Trait Implementations
impl RefUnwindSafe for HttpError
impl UnwindSafe for HttpError
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more