Trait DownloadRetrier

Source
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

作出重试决定

Trait Implementations§

Source§

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

Source§

fn clone(&self) -> Box<dyn DownloadRetrier + '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 DownloadRetrier + Send + 'clone>

Source§

fn clone(&self) -> Box<dyn DownloadRetrier + 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 DownloadRetrier + Sync + Send + 'clone>

Source§

fn clone(&self) -> Box<dyn DownloadRetrier + 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 DownloadRetrier + Sync + 'clone>

Source§

fn clone(&self) -> Box<dyn DownloadRetrier + 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> DownloadRetrier for &'a T
where T: 'a + DownloadRetrier + ?Sized, &'a T: DynClone + Debug + Sync + Send,

Source§

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

Source§

impl<'a, T> DownloadRetrier for &'a mut T

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§