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

获取退避时长

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§