pub trait ResumablePolicyProvider: DynClone + Debug + Sync + Send {
    fn get_policy_from_size(
        &self,
        source_size: u64,
        opts: GetPolicyOptions
    ) -> ResumablePolicy; fn get_policy_from_reader(
        &self,
        reader: Box<dyn DynRead + 'a, Global>,
        opts: GetPolicyOptions
    ) -> Result<(ResumablePolicy, Box<dyn DynRead + 'a, Global>), Error>; fn get_policy_from_async_reader(
        &self,
        reader: Box<dyn DynAsyncRead + 'a, Global>,
        opts: GetPolicyOptions
    ) -> Pin<Box<dyn Future<Output = Result<(ResumablePolicy, Box<dyn DynAsyncRead + 'a, Global>), Error>> + Send + 'a, Global>>; }
Expand description

可恢复策略获取接口

Required Methods

通过数据源大小获取可恢复策略

通过输入流获取可恢复策略

返回选择的可恢复策略,以及经过更新的输入流

该方法的异步版本为 Self::get_policy_from_async_reader

通过异步输入流获取可恢复策略

返回选择的可恢复策略,以及经过更新的异步输入流

Implementations on Foreign Types

Implementors