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

退避时长获取接口

Required Methods§

source

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

获取退避时长

Trait Implementations§

source§

impl<'clone> Clone for Box<dyn Backoff + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'clone> Clone for Box<dyn Backoff + Send + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'clone> Clone for Box<dyn Backoff + Send + Sync + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'clone> Clone for Box<dyn Backoff + Sync + 'clone>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementations on Foreign Types§

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

Implementors§