pub struct MethodOverride { /* private fields */ }Expand description
Rewrites a POST carrying _method into that method.
Implementations§
Source§impl MethodOverride
impl MethodOverride
Sourcepub fn new() -> MethodOverride
pub fn new() -> MethodOverride
Read the override from the form field only.
Sourcepub fn trusting_the_header(self) -> MethodOverride
pub fn trusting_the_header(self) -> MethodOverride
Also honour X-HTTP-Method-Override.
For a client behind something that will not forward a PATCH — some
corporate proxies still will not. Separate from the default because a
header is easier to attach by accident than a form field: an
intermediary that adds it to every request would rewrite every POST
in the application.
Trait Implementations§
Source§impl Clone for MethodOverride
impl Clone for MethodOverride
Source§fn clone(&self) -> MethodOverride
fn clone(&self) -> MethodOverride
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MethodOverride
impl Debug for MethodOverride
Source§impl Default for MethodOverride
impl Default for MethodOverride
Source§fn default() -> MethodOverride
fn default() -> MethodOverride
Returns the “default value” for a type. Read more
Source§impl Middleware for MethodOverride
impl Middleware for MethodOverride
Auto Trait Implementations§
impl Freeze for MethodOverride
impl RefUnwindSafe for MethodOverride
impl Send for MethodOverride
impl Sync for MethodOverride
impl Unpin for MethodOverride
impl UnsafeUnpin for MethodOverride
impl UnwindSafe for MethodOverride
Blanket Implementations§
impl<T> Actor for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ConcreteMiddleware for Twhere
T: Middleware,
impl<T> ConcreteMiddleware for Twhere
T: Middleware,
Source§fn concrete_type_id(&self) -> TypeId
fn concrete_type_id(&self) -> TypeId
The
TypeId of the implementing type.Source§fn concrete_type_name(&self) -> &'static str
fn concrete_type_name(&self) -> &'static str
Its fully-qualified type name.
Source§impl<T> Event for T
impl<T> Event for T
Source§fn event_name() -> &'static strwhere
Self: Sized,
fn event_name() -> &'static strwhere
Self: Sized,
A human-readable name, used by wildcard listeners and log output.
Always the Rust type path; see the trait docs.
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<M> IntoMiddlewareStack for Mwhere
M: Middleware,
impl<M> IntoMiddlewareStack for Mwhere
M: Middleware,
Source§fn into_middleware_stack(self) -> MiddlewareStack
fn into_middleware_stack(self) -> MiddlewareStack
Convert into a stack.
Creates a shared type from an unshared type.