pub trait Backoff: DynClone + Debug + Sync + Send {
    // Required method
    fn time(
        &self,
        request: &mut RequestParts<'_>,
        opts: BackoffOptions<'_>
    ) -> GotBackoffDuration;
}
Expand description

退避时长获取接口

Required Methods§

fn time( &self, request: &mut RequestParts<'_>, opts: BackoffOptions<'_> ) -> GotBackoffDuration

获取退避时长

Implementations on Foreign Types§

§

impl<'a, T> Backoff for &'a Twhere T: 'a + Backoff + ?Sized, &'a T: DynClone + Debug + Sync + Send,

§

fn time( &self, request: &mut RequestParts<'_>, opts: BackoffOptions<'_> ) -> GotBackoffDuration

§

impl<T> Backoff for Box<T, Global>where T: Backoff + ?Sized, Box<T, Global>: DynClone + Debug + Sync + Send,

§

fn time( &self, request: &mut RequestParts<'_>, opts: BackoffOptions<'_> ) -> GotBackoffDuration

§

impl<T> Backoff for Rc<T>where T: Backoff + ?Sized, Rc<T>: DynClone + Debug + Sync + Send,

§

fn time( &self, request: &mut RequestParts<'_>, opts: BackoffOptions<'_> ) -> GotBackoffDuration

§

impl<'a, T> Backoff for &'a mut Twhere T: 'a + Backoff + ?Sized, &'a mut T: DynClone + Debug + Sync + Send,

§

fn time( &self, request: &mut RequestParts<'_>, opts: BackoffOptions<'_> ) -> GotBackoffDuration

§

impl<T> Backoff for Arc<T>where T: Backoff + ?Sized, Arc<T>: DynClone + Debug + Sync + Send,

§

fn time( &self, request: &mut RequestParts<'_>, opts: BackoffOptions<'_> ) -> GotBackoffDuration

Implementors§

§

impl Backoff for ExponentialBackoff

§

impl Backoff for FixedBackoff

§

impl<P> Backoff for LimitedBackoff<P>where P: Backoff + Clone,

§

impl<P> Backoff for RandomizedBackoff<P>where P: Backoff + Clone,