Trait Backoff

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

退避时长获取接口

Required Methods§

Source

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

获取退避时长

Trait Implementations§

Source§

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

Source§

fn clone(&self) -> Box<dyn Backoff + 'clone>

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) -> Box<dyn Backoff + Send + 'clone>

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 + Send + 'clone>

Source§

fn clone(&self) -> Box<dyn Backoff + Sync + Send + 'clone>

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) -> Box<dyn Backoff + Sync + 'clone>

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> Backoff for &'a T
where T: 'a + Backoff + ?Sized, &'a T: DynClone + Debug + Sync + Send,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§