pub enum RedirectError {
TooMany(u32),
OriginNotAllowed(String),
DowngradeBlocked,
MissingLocation,
InvalidLocation {
value: String,
error: String,
},
}Available on crate feature
client only.Expand description
Errors produced by FollowRedirects when a redirect cannot be followed.
Variants§
TooMany(u32)
The redirect chain exceeded the configured maximum.
OriginNotAllowed(String)
The redirect target’s origin is not in the configured allowlist.
DowngradeBlocked
The original request was HTTPS and the redirect target is HTTP, but downgrade is not allowed.
MissingLocation
The redirect response had no Location header.
InvalidLocation
The Location header could not be parsed as a valid URL relative to the request URL.
Trait Implementations§
Source§impl Debug for RedirectError
impl Debug for RedirectError
Source§impl Display for RedirectError
impl Display for RedirectError
Source§impl Error for RedirectError
impl Error for RedirectError
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 From<RedirectError> for Error
impl From<RedirectError> for Error
Source§fn from(err: RedirectError) -> Self
fn from(err: RedirectError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RedirectError
impl RefUnwindSafe for RedirectError
impl Send for RedirectError
impl Sync for RedirectError
impl Unpin for RedirectError
impl UnsafeUnpin for RedirectError
impl UnwindSafe for RedirectError
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