Struct Attempt
pub struct Attempt<'a> { /* private fields */ }
A type that holds information on the next request and previous requests in redirect chain.
Implementations
impl<'a> Attempt<'a>
fn status(&self) -> StatusCodeGet the type of redirect.
fn url(&self) -> &UrlGet the next URL to redirect to.
fn previous(&self) -> &[Url]Get the list of previous URLs that have already been requested in this chain.
fn follow(self) -> ActionReturns an action meaning reqwest should follow the next URL.
fn stop(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, error: E) -> ActionReturns an action failing the redirect with an error.
The
Errorwill be returned for the result of the sent request.
Trait Implementations
impl<'a> Debug for Attempt<'a>
fn fmt(&self, f: &mut Formatter<'_>) -> Result