Struct xitca_web::error::MethodNotAllowed
source · pub struct MethodNotAllowed(pub Box<Vec<Method>>);Expand description
Error type of Method not allow for route.
Tuple Fields§
§0: Box<Vec<Method>>Implementations§
source§impl MethodNotAllowed
impl MethodNotAllowed
sourcepub fn allowed_methods(&self) -> &[Method]
pub fn allowed_methods(&self) -> &[Method]
slice of allowed methods of current route.
Trait Implementations§
source§impl Debug for MethodNotAllowed
impl Debug for MethodNotAllowed
source§impl Display for MethodNotAllowed
impl Display for MethodNotAllowed
source§impl Error for MethodNotAllowed
impl Error for MethodNotAllowed
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<C> From<MethodNotAllowed> for Error<C>
impl<C> From<MethodNotAllowed> for Error<C>
source§fn from(e: MethodNotAllowed) -> Self
fn from(e: MethodNotAllowed) -> Self
Converts to this type from the input type.
source§impl<'r, C, B> Service<WebContext<'r, C, B>> for MethodNotAllowed
impl<'r, C, B> Service<WebContext<'r, C, B>> for MethodNotAllowed
§type Response = Response<ResponseBody>
type Response = Response<ResponseBody>
The Ok part of output future.
§type Error = Infallible
type Error = Infallible
The Err part of output future.
async fn call( &self, ctx: WebContext<'r, C, B>, ) -> Result<Self::Response, Self::Error>
Auto Trait Implementations§
impl Freeze for MethodNotAllowed
impl RefUnwindSafe for MethodNotAllowed
impl Send for MethodNotAllowed
impl Sync for MethodNotAllowed
impl Unpin for MethodNotAllowed
impl UnwindSafe for MethodNotAllowed
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>(self, func: T) -> Pipeline<Self, T, BuildEnclosedFn>
fn enclosed_fn<T, Req>(self, func: T) -> Pipeline<Self, T, BuildEnclosedFn>
Function version of Self::enclosed method.
source§fn map<F, Res, ResMap>(self, mapper: F) -> Pipeline<Self, F, BuildMap>
fn map<F, Res, ResMap>(self, mapper: F) -> Pipeline<Self, F, BuildMap>
Mutate
<<Self::Response as Service<Req>>::Future as Future>::Output type with given
closure.