Skip to main content

DynRetryPolicy

Struct DynRetryPolicy 

Source
pub struct DynRetryPolicy<'dynosaur_struct> { /* private fields */ }
Expand description

Dyn-compatible wrapper for RetryPolicy.

Implementations§

Source§

impl<'dynosaur_struct> DynRetryPolicy<'dynosaur_struct>

Source

pub fn new_box( value: impl RetryPolicy + 'dynosaur_struct, ) -> _Box<DynRetryPolicy<'dynosaur_struct>>

Create Box<DynRetryPolicy> from a value implementing RetryPolicy.

Source

pub fn new_arc( value: impl RetryPolicy + 'dynosaur_struct, ) -> _Arc<DynRetryPolicy<'dynosaur_struct>> ⓘ

Create Arc<DynRetryPolicy> from a value implementing RetryPolicy.

Source

pub fn new_rc( value: impl RetryPolicy + 'dynosaur_struct, ) -> _Rc<DynRetryPolicy<'dynosaur_struct>>

Create Rc<DynRetryPolicy> from a value implementing RetryPolicy.

Source

pub const fn from_box( value: _Box<impl RetryPolicy + 'dynosaur_struct>, ) -> _Box<DynRetryPolicy<'dynosaur_struct>>

Convert Box<impl RetryPolicy> to Box<DynRetryPolicy>.

Source

pub const fn from_arc( value: _Arc<impl RetryPolicy + 'dynosaur_struct>, ) -> _Arc<DynRetryPolicy<'dynosaur_struct>> ⓘ

Convert Arc<impl RetryPolicy> to Arc<DynRetryPolicy>.

Source

pub const fn from_rc( value: _Rc<impl RetryPolicy + 'dynosaur_struct>, ) -> _Rc<DynRetryPolicy<'dynosaur_struct>>

Convert Rc<impl RetryPolicy> to Rc<DynRetryPolicy>.

Source

pub const fn from_ref( value: &(impl RetryPolicy + 'dynosaur_struct), ) -> &DynRetryPolicy<'dynosaur_struct>

Convert &impl RetryPolicy to &DynRetryPolicy.

Source

pub const fn from_mut( value: &mut (impl RetryPolicy + 'dynosaur_struct), ) -> &mut DynRetryPolicy<'dynosaur_struct>

Convert &mut impl RetryPolicy to &mut DynRetryPolicy.

Trait Implementations§

Source§

impl<'dynosaur_struct> RetryPolicy for DynRetryPolicy<'dynosaur_struct>

Source§

fn decide( &self, response: &ResponseMeta<'_>, attempt: &AttemptInfo, schedule: &RetryConfig, ) -> Decision

Decide what follows response. schedule is the loop’s own RetryConfig, for a policy that sizes a hold from it.

Auto Trait Implementations§

§

impl<'dynosaur_struct> !Freeze for DynRetryPolicy<'dynosaur_struct>

§

impl<'dynosaur_struct> !RefUnwindSafe for DynRetryPolicy<'dynosaur_struct>

§

impl<'dynosaur_struct> !Sized for DynRetryPolicy<'dynosaur_struct>

§

impl<'dynosaur_struct> !Unpin for DynRetryPolicy<'dynosaur_struct>

§

impl<'dynosaur_struct> !UnsafeUnpin for DynRetryPolicy<'dynosaur_struct>

§

impl<'dynosaur_struct> !UnwindSafe for DynRetryPolicy<'dynosaur_struct>

§

impl<'dynosaur_struct> Send for DynRetryPolicy<'dynosaur_struct>

§

impl<'dynosaur_struct> Sync for DynRetryPolicy<'dynosaur_struct>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

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

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

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

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more