Struct RedirectFn
pub struct RedirectFn<F> { /* private fields */ }
A redirection Policy created from a closure.
See redirect_fn for more details.
Trait Implementations
impl<B, E, F> Policy<B, E> for RedirectFn<F>
where
F: FnMut(&Attempt<'_>) -> Result<Action, E>,
fn redirect(&mut self, attempt: &Attempt<'_>) -> Result<Action, E>
impl<F> Debug for RedirectFn<F>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<F: Clone> Clone for RedirectFn<F>
fn clone(&self) -> RedirectFn<F>
impl<F: Copy> Copy for RedirectFn<F>
Auto Trait Implementations
impl<F> Freeze for RedirectFn<F>
where
F: Freeze,
impl<F> RefUnwindSafe for RedirectFn<F>
where
F: RefUnwindSafe,
impl<F> Send for RedirectFn<F>
where
F: Send,
impl<F> Sync for RedirectFn<F>
where
F: Sync,
impl<F> Unpin for RedirectFn<F>
where
F: Unpin,
impl<F> UnsafeUnpin for RedirectFn<F>
where
F: UnsafeUnpin,
impl<F> UnwindSafe for RedirectFn<F>
where
F: UnwindSafe,
Blanket Implementations
impl<T> Any for RedirectFn<F>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for RedirectFn<F>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for RedirectFn<F>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for RedirectFn<F>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for RedirectFn<F>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for RedirectFn<F>
impl<T> PolicyExt for RedirectFn<F>
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 RedirectFn<F>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> WithSubscriber for RedirectFn<F>
impl<T, U> Into<U> for RedirectFn<F>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for RedirectFn<F>
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 RedirectFn<F>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>