1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
/// Describes a policy for handling server redirects.
///
/// The default is to not follow redirects.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum RedirectPolicy {
/// Do not apply any special treatment to redirect responses. The response
/// will be returned as-is and redirects will not be followed.
///
/// This is the default policy.
None,
/// Follow all redirects automatically.
Follow,
/// Follow redirects automatically up to a maximum number of redirects.
Limit(u32),
}
impl Default for RedirectPolicy {
fn default() -> Self {
RedirectPolicy::None
}
}