#[non_exhaustive]pub enum RedirectRefusal {
UnapprovedOrigin,
SchemeDowngrade,
Credentials,
Malformed,
}Expand description
Why a redirect target was refused by crate::HttpError::RedirectRefused or
check_redirect_target.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnapprovedOrigin
The target’s origin is neither the request’s origin nor in its ApprovedOrigins.
SchemeDowngrade
The redirect leaves https for http. Returned by check_redirect_target only;
the clients report this refusal as crate::HttpError::AddressDenied (see
AddressPolicy::allow_insecure_redirects).
Credentials
The target’s authority carries userinfo (user:pass@host).
Malformed
The target is not a shape this check accepts: another scheme, no host, a bad port, or whitespace, control characters or a backslash anywhere in the URL.
Trait Implementations§
Source§impl Clone for RedirectRefusal
impl Clone for RedirectRefusal
impl Copy for RedirectRefusal
Source§impl Debug for RedirectRefusal
impl Debug for RedirectRefusal
Source§impl Display for RedirectRefusal
impl Display for RedirectRefusal
impl Eq for RedirectRefusal
Source§impl Error for RedirectRefusal
impl Error for RedirectRefusal
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 Hash for RedirectRefusal
impl Hash for RedirectRefusal
Source§impl PartialEq for RedirectRefusal
impl PartialEq for RedirectRefusal
impl StructuralPartialEq for RedirectRefusal
Auto Trait Implementations§
impl Freeze for RedirectRefusal
impl RefUnwindSafe for RedirectRefusal
impl Send for RedirectRefusal
impl Sync for RedirectRefusal
impl Unpin for RedirectRefusal
impl UnsafeUnpin for RedirectRefusal
impl UnwindSafe for RedirectRefusal
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