Struct RedirectFn

struct RedirectFn<F> { ... }

A redirection Policy created from a closure.

See redirect_fn for more details.

Implementations

impl<B, E, F> Policy for RedirectFn<F>

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

impl<F> Debug for RedirectFn<F>

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

impl<F> Freeze for RedirectFn<F>

impl<F> RefUnwindSafe for RedirectFn<F>

impl<F> Send for RedirectFn<F>

impl<F> Sync for RedirectFn<F>

impl<F> Unpin for RedirectFn<F>

impl<F> UnsafeUnpin for RedirectFn<F>

impl<F> UnwindSafe for RedirectFn<F>

impl<F: $crate::clone::Clone> Clone for RedirectFn<F>

fn clone(self: &Self) -> RedirectFn<F>

impl<F: $crate::marker::Copy> Copy for RedirectFn<F>

impl<T> Any for RedirectFn<F>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for RedirectFn<F>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for RedirectFn<F>

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

impl<T> CloneToUninit for RedirectFn<F>

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

impl<T> From for RedirectFn<F>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for RedirectFn<F>

impl<T> PolicyExt for RedirectFn<F>

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> ToOwned for RedirectFn<F>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> WithSubscriber for RedirectFn<F>

impl<T, U> Into for RedirectFn<F>

fn into(self: 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 for RedirectFn<F>

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

impl<T, U> TryInto for RedirectFn<F>

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