Enum Action

pub enum Action

A value returned by Policy::redirect which indicates the action [FollowRedirect][super::FollowRedirect] should take for a redirection response.

Variants

Follow

Follow the redirection.

Stop

Do not follow the redirection, and return the redirection response as-is.

Implementations

impl Action

fn is_follow(&self) -> bool

Returns true if the Action is a Follow value.

fn is_stop(&self) -> bool

Returns true if the Action is a Stop value.

Trait Implementations

impl Clone for Action

fn clone(&self) -> Self

impl Copy for Action

impl Debug for Action

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<B, E> Policy<B, E> for Action

fn redirect(&mut self, &Attempt<'_>) -> Result<Action, E>

Auto Trait Implementations

impl Freeze for Action

impl RefUnwindSafe for Action

impl Send for Action

impl Sync for Action

impl Unpin for Action

impl UnsafeUnpin for Action

impl UnwindSafe for Action

Blanket Implementations

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

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for Action where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Action where T: ?Sized,

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

impl<T> CloneToUninit for Action where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for Action

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for Action

impl<T> PolicyExt for Action 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> ToOwned for Action where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T> WithSubscriber for Action

impl<T, U> Into<U> for Action 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 Action where U: Into<T>,

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

impl<T, U> TryInto<U> for Action where U: TryFrom<T>,

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