Struct Attempt
struct Attempt<'a> { ... }
A type that holds information on the next request and previous requests in redirect chain.
Implementations
impl<'a> Attempt<'a>
fn status(self: &Self) -> StatusCodeGet the type of redirect.
fn url(self: &Self) -> &UrlGet the next URL to redirect to.
fn previous(self: &Self) -> &[Url]Get the list of previous URLs that have already been requested in this chain.
fn follow(self: Self) -> ActionReturns an action meaning reqwest should follow the next URL.
fn stop(self: Self) -> ActionReturns an action meaning reqwest should not follow the next URL.
The 30x response will be returned as the
Okresult.fn error<E: Into<Box<dyn StdError + Send + Sync>>>(self: Self, error: E) -> ActionReturns an action failing the redirect with an error.
The
Errorwill be returned for the result of the sent request.
impl<'a> Debug for Attempt<'a>
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl<'a> Freeze for Attempt<'a>
impl<'a> RefUnwindSafe for Attempt<'a>
impl<'a> Send for Attempt<'a>
impl<'a> Sync for Attempt<'a>
impl<'a> Unpin for Attempt<'a>
impl<'a> UnwindSafe for Attempt<'a>
impl<T> Any for Attempt<'a>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Attempt<'a>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Attempt<'a>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> ErasedDestructor for Attempt<'a>
impl<T> From for Attempt<'a>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for Attempt<'a>
impl<T> PolicyExt for Attempt<'a>
fn and<P, B, E>(self: Self, other: P) -> And<T, P> where T: Policy<B, E>, P: Policy<B, E>fn or<P, B, E>(self: Self, other: P) -> Or<T, P> where T: Policy<B, E>, P: Policy<B, E>
impl<T> WithSubscriber for Attempt<'a>
impl<T, U> Into for Attempt<'a>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Attempt<'a>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Attempt<'a>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>