pub enum CsrfErrorKind {
Show 13 variants
TokenNameInvalid,
CookieMissing,
HeaderMissing,
TokenInvalid,
RequestSourceUntrusted,
RequestOriginUntrusted,
RequestRefererUntrusted,
RequestSourceMissing,
RequestSchemeInvalid,
RequestHostInvalid,
RequestOriginInvalid,
RequestRefererInvalid,
RequestHeaderValueInvalid,
}Expand description
Product-neutral CSRF failure category.
Variants§
TokenNameInvalid
A configured CSRF cookie or header name was invalid.
This can only be returned while constructing CsrfTokenNames, not while validating a
normal request.
CookieMissing
The CSRF cookie was missing.
HeaderMissing
The CSRF header was missing.
TokenInvalid
The CSRF cookie and header did not match.
RequestSourceUntrusted
Sec-Fetch-Site reported an untrusted source.
RequestOriginUntrusted
Origin was present but not trusted.
RequestRefererUntrusted
Referer was present but not trusted.
RequestSourceMissing
Required source headers were missing.
RequestSchemeInvalid
Request scheme was malformed or too long.
RequestHostInvalid
Request host was malformed or too long.
RequestOriginInvalid
Origin header was malformed or too long.
RequestRefererInvalid
Referer header was malformed or too long.
RequestHeaderValueInvalid
Generic source header validation failure.
Trait Implementations§
Source§impl Clone for CsrfErrorKind
impl Clone for CsrfErrorKind
Source§fn clone(&self) -> CsrfErrorKind
fn clone(&self) -> CsrfErrorKind
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 CsrfErrorKind
impl Debug for CsrfErrorKind
Source§impl PartialEq for CsrfErrorKind
impl PartialEq for CsrfErrorKind
Source§fn eq(&self, other: &CsrfErrorKind) -> bool
fn eq(&self, other: &CsrfErrorKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for CsrfErrorKind
impl Eq for CsrfErrorKind
impl StructuralPartialEq for CsrfErrorKind
Auto Trait Implementations§
impl Freeze for CsrfErrorKind
impl RefUnwindSafe for CsrfErrorKind
impl Send for CsrfErrorKind
impl Sync for CsrfErrorKind
impl Unpin for CsrfErrorKind
impl UnsafeUnpin for CsrfErrorKind
impl UnwindSafe for CsrfErrorKind
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more