pub enum CSRFType {
Header,
Param,
ForceHeader,
ForceParam,
Disabled,
}Available on crate features
csrf and router only.Expand description
Per-route CSRF enforcement level (see crate::csrf).
By default checks apply to all unsafe methods; ForceHeader/ForceParam check on
every method, and Disabled never checks.
Variants§
Implementations§
Source§impl CSRFType
impl CSRFType
Sourcepub fn is_force_header(&self) -> bool
pub fn is_force_header(&self) -> bool
Returns true if this is a CSRFType::ForceHeader, otherwise false
Sourcepub fn is_force_param(&self) -> bool
pub fn is_force_param(&self) -> bool
Returns true if this is a CSRFType::ForceParam, otherwise false
Sourcepub fn is_disabled(&self) -> bool
pub fn is_disabled(&self) -> bool
Returns true if this is a CSRFType::Disabled, otherwise false
Trait Implementations§
impl Copy for CSRFType
Source§impl<'de> Deserialize<'de> for CSRFType
Available on crate feature serde only.
impl<'de> Deserialize<'de> for CSRFType
Available on crate feature
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CSRFType
impl RefUnwindSafe for CSRFType
impl Send for CSRFType
impl Sync for CSRFType
impl Unpin for CSRFType
impl UnsafeUnpin for CSRFType
impl UnwindSafe for CSRFType
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