pub struct ErrorStatus { /* private fields */ }
Expand description
error type derive from http status code. produce minimal “StatusCode Reason” response and stack backtrace of the location status code error occurs.
Implementations§
Source§impl ErrorStatus
impl ErrorStatus
Sourcepub fn internal() -> Self
pub fn internal() -> Self
construct an ErrorStatus type from StatusCode::INTERNAL_SERVER_ERROR
Sourcepub fn bad_request() -> Self
pub fn bad_request() -> Self
construct an ErrorStatus type from StatusCode::BAD_REQUEST
Trait Implementations§
Source§impl Debug for ErrorStatus
impl Debug for ErrorStatus
Source§impl Display for ErrorStatus
impl Display for ErrorStatus
Source§impl Error for ErrorStatus
impl Error for ErrorStatus
Source§fn provide<'a>(&'a self, request: &mut Request<'a>)
fn provide<'a>(&'a self, request: &mut Request<'a>)
🔬This is a nightly-only experimental API. (
error_generic_member_access
)Provides type-based access to context intended for error reports. Read more
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ErrorStatus> for Error
impl From<ErrorStatus> for Error
Source§fn from(e: ErrorStatus) -> Self
fn from(e: ErrorStatus) -> Self
Converts to this type from the input type.
Source§impl From<StatusCode> for ErrorStatus
impl From<StatusCode> for ErrorStatus
Source§fn from(status: StatusCode) -> Self
fn from(status: StatusCode) -> Self
Converts to this type from the input type.
Source§impl<'r, C, B> Responder<WebContext<'r, C, B>> for ErrorStatus
impl<'r, C, B> Responder<WebContext<'r, C, B>> for ErrorStatus
Source§impl<'r, C, B> Service<WebContext<'r, C, B>> for ErrorStatus
impl<'r, C, B> Service<WebContext<'r, C, B>> for ErrorStatus
Auto Trait Implementations§
impl !Freeze for ErrorStatus
impl RefUnwindSafe for ErrorStatus
impl Send for ErrorStatus
impl Sync for ErrorStatus
impl Unpin for ErrorStatus
impl UnwindSafe for ErrorStatus
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<S, Arg> ServiceExt<Arg> for Swhere
S: Service<Arg>,
impl<S, Arg> ServiceExt<Arg> for Swhere
S: Service<Arg>,
Source§fn enclosed<T>(self, build: T) -> Pipeline<Self, T, BuildEnclosed>
fn enclosed<T>(self, build: T) -> Pipeline<Self, T, BuildEnclosed>
Enclose Self with given
T as Service<<Self as Service<_>>::Response>>
. In other word T
would take Self’s Service::Response
type as it’s generic argument of Service<_>
impl.Source§fn enclosed_fn<T, Req, O>(
self,
func: T,
) -> Pipeline<Self, AsyncFn<T>, BuildEnclosed>
fn enclosed_fn<T, Req, O>( self, func: T, ) -> Pipeline<Self, AsyncFn<T>, BuildEnclosed>
Function version of Self::enclosed method.
Source§fn map<F, Res, ResMap>(self, mapper: F) -> Pipeline<Self, Map<F>, BuildEnclosed>
fn map<F, Res, ResMap>(self, mapper: F) -> Pipeline<Self, Map<F>, BuildEnclosed>
Mutate
<<Self::Response as Service<Req>>::Future as Future>::Output
type with given
closure.