pub trait DownloadRetrier: DynClone + Debug + Sync + Send {
    // Required method
    fn retry(
        &self,
        request: &mut dyn CallbackContext,
        opts: DownloadRetrierOptions<'_>
    ) -> RetryResult;
}
Expand description

下载重试器

根据 HTTP 客户端返回的错误,决定是否重试请求,重试决定由 RetryDecision 定义。

Required Methods§

source

fn retry( &self, request: &mut dyn CallbackContext, opts: DownloadRetrierOptions<'_> ) -> RetryResult

作出重试决定

Implementations on Foreign Types§

source§

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

source§

fn retry( &self, request: &mut dyn CallbackContext, opts: DownloadRetrierOptions<'_> ) -> RetryResult

source§

impl<'a, T: 'a + DownloadRetrier + ?Sized> DownloadRetrier for &'a mut T

source§

fn retry( &self, request: &mut dyn CallbackContext, opts: DownloadRetrierOptions<'_> ) -> RetryResult

source§

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

source§

fn retry( &self, request: &mut dyn CallbackContext, opts: DownloadRetrierOptions<'_> ) -> RetryResult

source§

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

source§

fn retry( &self, request: &mut dyn CallbackContext, opts: DownloadRetrierOptions<'_> ) -> RetryResult

source§

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

source§

fn retry( &self, request: &mut dyn CallbackContext, opts: DownloadRetrierOptions<'_> ) -> RetryResult

Implementors§