pub enum CsrfError {
TokenMismatch,
MissingCookie,
MissingToken,
}
Expand description
Internal errors that can happen when processing CSRF tokens.
Variants§
TokenMismatch
The CSRF Token and the token provided in the headers do not match.
MissingCookie
No CSRF Token in the cookies.
MissingToken
No CSRF Token in the request.
Trait Implementations§
Source§impl Error for CsrfError
impl Error for CsrfError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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 Ord for CsrfError
impl Ord for CsrfError
Source§impl PartialOrd for CsrfError
impl PartialOrd for CsrfError
Source§impl ResponseError for CsrfError
impl ResponseError for CsrfError
Source§fn error_response(&self) -> HttpResponse
fn error_response(&self) -> HttpResponse
Creates full response for error. Read more
Source§fn status_code(&self) -> StatusCode
fn status_code(&self) -> StatusCode
Returns appropriate status code for error. Read more
impl Copy for CsrfError
impl Eq for CsrfError
impl StructuralPartialEq for CsrfError
Auto Trait Implementations§
impl Freeze for CsrfError
impl RefUnwindSafe for CsrfError
impl Send for CsrfError
impl Sync for CsrfError
impl Unpin for CsrfError
impl UnwindSafe for CsrfError
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> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.