pub enum CsrfMode {
DoubleSubmit,
HeaderOnly,
}Expand description
CSRF protection mode.
Variants§
DoubleSubmit
Double-submit cookie pattern: token in cookie must match token in header. This is the default and most common pattern.
HeaderOnly
Require token in header only (for APIs where cookies are not used).
Trait Implementations§
impl Copy for CsrfMode
impl Eq for CsrfMode
impl StructuralPartialEq for CsrfMode
Auto Trait Implementations§
impl Freeze for CsrfMode
impl RefUnwindSafe for CsrfMode
impl Send for CsrfMode
impl Sync for CsrfMode
impl Unpin for CsrfMode
impl UnwindSafe for CsrfMode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).