Struct Limited

pub struct Limited { /* private fields */ }

A redirection Policy that limits the number of successive redirections.

Implementations

impl Limited

fn new(max: usize) -> Self

Create a new Limited with a limit of max redirections.

Trait Implementations

impl Clone for Limited

fn clone(&self) -> Limited

impl Copy for Limited

impl Debug for Limited

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

impl Default for Limited

fn default() -> Self

Returns the default Limited with a limit of 20 redirections.

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

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

Auto Trait Implementations

impl Freeze for Limited

impl RefUnwindSafe for Limited

impl Send for Limited

impl Sync for Limited

impl Unpin for Limited

impl UnsafeUnpin for Limited

impl UnwindSafe for Limited

Blanket Implementations

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

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

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

impl<T> From<T> for Limited

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for Limited

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

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

impl<T> WithSubscriber for Limited

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

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