pub enum ProtectionError {
CrossOriginRequest,
CrossOriginRequestFromOldBrowser,
MalformedHost(ParseError),
MalformedOrigin(ParseError),
}Expand description
Errors that can occur during request processing of the middleware.
These errors must be handled when using the middleware in web frameworks (such as axum) to e.g. log errors or render appropriate responses.
Variants§
CrossOriginRequest
A cross-origin request was detected.
CrossOriginRequestFromOldBrowser
A cross-origin request was detected.
MalformedHost(ParseError)
The host request header cannot be parsed.
MalformedOrigin(ParseError)
The origin request header cannot be parsed.
Trait Implementations§
Source§impl Debug for ProtectionError
impl Debug for ProtectionError
Source§impl Display for ProtectionError
impl Display for ProtectionError
Source§impl Error for ProtectionError
impl Error for ProtectionError
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 PartialEq for ProtectionError
impl PartialEq for ProtectionError
impl StructuralPartialEq for ProtectionError
Auto Trait Implementations§
impl Freeze for ProtectionError
impl RefUnwindSafe for ProtectionError
impl Send for ProtectionError
impl Sync for ProtectionError
impl Unpin for ProtectionError
impl UnwindSafe for ProtectionError
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