Struct Attempt

pub struct Attempt<'a> { /* private fields */ }

A type that holds information on a redirection attempt.

Implementations

impl<'a> Attempt<'a>

fn status(&self) -> StatusCode

Returns the redirection response.

fn method(&self) -> &'a Method

Returns the destination method of the redirection.

fn location(&self) -> &'a Uri

Returns the destination URI of the redirection.

fn previous_method(&self) -> &'a Method

Returns the method for the previous request, before redirection.

fn previous(&self) -> &'a Uri

Returns the URI of the original request.

Auto Trait Implementations

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> UnsafeUnpin for Attempt<'a>

impl<'a> UnwindSafe for Attempt<'a>

Blanket Implementations

impl<T> Any for Attempt<'a> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Attempt<'a> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Attempt<'a> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for Attempt<'a>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for Attempt<'a>

impl<T> PolicyExt for Attempt<'a> where T: ?Sized,

fn and<P, B, E>(self, other: P) -> And<T, P>
where
    T: Sized + Policy<B, E>,
    P: Policy<B, E>,
fn or<P, B, E>(self, other: P) -> Or<T, P>
where
    T: Sized + Policy<B, E>,
    P: Policy<B, E>,

impl<T> WithSubscriber for Attempt<'a>

impl<T, U> Into<U> for Attempt<'a> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Attempt<'a> where U: Into<T>,

type Error = Infallible;
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto<U> for Attempt<'a> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>