pub trait Backoff: Debug + Sync + Send {
fn time(
&self,
request: &mut RequestParts<'_>,
opts: BackoffOptions<'_>
) -> GotBackoffDuration;
}
Expand description
退避时长获取接口
Required Methods
fn time(
&self,
request: &mut RequestParts<'_>,
opts: BackoffOptions<'_>
) -> GotBackoffDuration
fn time(
&self,
request: &mut RequestParts<'_>,
opts: BackoffOptions<'_>
) -> GotBackoffDuration
获取退避时长
Implementations on Foreign Types
sourceimpl<'a, T> Backoff for &'a T where
T: 'a + Backoff + ?Sized,
&'a T: Debug,
&'a T: Sync,
&'a T: Send,
impl<'a, T> Backoff for &'a T where
T: 'a + Backoff + ?Sized,
&'a T: Debug,
&'a T: Sync,
&'a T: Send,
sourcefn time(
&self,
request: &mut RequestParts<'_>,
opts: BackoffOptions<'_>
) -> GotBackoffDuration
fn time(
&self,
request: &mut RequestParts<'_>,
opts: BackoffOptions<'_>
) -> GotBackoffDuration
获取退避时长
sourceimpl<'a, T> Backoff for &'a mut T where
T: 'a + Backoff + ?Sized,
&'a mut T: Debug,
&'a mut T: Sync,
&'a mut T: Send,
impl<'a, T> Backoff for &'a mut T where
T: 'a + Backoff + ?Sized,
&'a mut T: Debug,
&'a mut T: Sync,
&'a mut T: Send,
sourcefn time(
&self,
request: &mut RequestParts<'_>,
opts: BackoffOptions<'_>
) -> GotBackoffDuration
fn time(
&self,
request: &mut RequestParts<'_>,
opts: BackoffOptions<'_>
) -> GotBackoffDuration
获取退避时长
sourceimpl<T> Backoff for Rc<T> where
T: Backoff + ?Sized,
Rc<T>: Debug,
Rc<T>: Sync,
Rc<T>: Send,
impl<T> Backoff for Rc<T> where
T: Backoff + ?Sized,
Rc<T>: Debug,
Rc<T>: Sync,
Rc<T>: Send,
sourcefn time(
&self,
request: &mut RequestParts<'_>,
opts: BackoffOptions<'_>
) -> GotBackoffDuration
fn time(
&self,
request: &mut RequestParts<'_>,
opts: BackoffOptions<'_>
) -> GotBackoffDuration
获取退避时长
sourceimpl<T> Backoff for Box<T, Global> where
T: Backoff + ?Sized,
Box<T, Global>: Debug,
Box<T, Global>: Sync,
Box<T, Global>: Send,
impl<T> Backoff for Box<T, Global> where
T: Backoff + ?Sized,
Box<T, Global>: Debug,
Box<T, Global>: Sync,
Box<T, Global>: Send,
sourcefn time(
&self,
request: &mut RequestParts<'_>,
opts: BackoffOptions<'_>
) -> GotBackoffDuration
fn time(
&self,
request: &mut RequestParts<'_>,
opts: BackoffOptions<'_>
) -> GotBackoffDuration
获取退避时长
sourceimpl<T> Backoff for Arc<T> where
T: Backoff + ?Sized,
Arc<T>: Debug,
Arc<T>: Sync,
Arc<T>: Send,
impl<T> Backoff for Arc<T> where
T: Backoff + ?Sized,
Arc<T>: Debug,
Arc<T>: Sync,
Arc<T>: Send,
sourcefn time(
&self,
request: &mut RequestParts<'_>,
opts: BackoffOptions<'_>
) -> GotBackoffDuration
fn time(
&self,
request: &mut RequestParts<'_>,
opts: BackoffOptions<'_>
) -> GotBackoffDuration
获取退避时长