Struct salvo::http::errors::HttpError [−][src]
pub struct HttpError { pub code: StatusCode, pub name: String, pub summary: Option<String>, pub detail: Option<String>, }
Fields
code: StatusCode
name: String
summary: Option<String>
detail: Option<String>
Implementations
impl HttpError
[src]
impl HttpError
[src]pub fn with_summary(self, summary: impl Into<String>) -> HttpError
[src]
pub fn with_detail(self, detail: impl Into<String>) -> HttpError
[src]
Trait Implementations
impl Error for HttpError
[src]
impl Error for HttpError
[src]fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str
1.0.0[src]
fn description(&self) -> &str
1.0.0[src]👎 Deprecated since 1.42.0:
use the Display impl or to_string()
impl Writer for HttpError
[src]
impl Writer for HttpError
[src]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 = ()> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
HttpError: 'async_trait,
[src]
self,
req: &'life0 mut Request,
_depot: &'life1 mut Depot,
res: &'life2 mut Response
) -> Pin<Box<dyn Future<Output = ()> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
HttpError: 'async_trait,
Auto Trait Implementations
impl RefUnwindSafe for HttpError
impl Send for HttpError
impl Sync for HttpError
impl Unpin for HttpError
impl UnwindSafe for HttpError
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,