pub trait AsyncDataSource<A>:
DynClone
+ Debug
+ Sync
+ Sendwhere
A: Digest,{
// Required methods
fn slice(
&self,
size: PartSize,
) -> Pin<Box<dyn Future<Output = Result<Option<AsyncDataSourceReader>, Error>> + Send + '_>>;
fn reset(
&self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>;
fn source_key(
&self,
) -> Pin<Box<dyn Future<Output = Result<Option<SourceKey<A>>, Error>> + Send + '_>>;
fn total_size(
&self,
) -> Pin<Box<dyn Future<Output = Result<Option<u64>, Error>> + Send + '_>>;
}
Expand description
异步数据源接口
提供上传所用的数据源
Required Methods§
Sourcefn slice(
&self,
size: PartSize,
) -> Pin<Box<dyn Future<Output = Result<Option<AsyncDataSourceReader>, Error>> + Send + '_>>
fn slice( &self, size: PartSize, ) -> Pin<Box<dyn Future<Output = Result<Option<AsyncDataSourceReader>, Error>> + Send + '_>>
异步数据源切片
Trait Implementations§
Source§impl<'clone, A> Clone for Box<dyn AsyncDataSource<A> + 'clone>where
A: Digest,
impl<'clone, A> Clone for Box<dyn AsyncDataSource<A> + 'clone>where
A: Digest,
Source§fn clone(&self) -> Box<dyn AsyncDataSource<A> + 'clone>
fn clone(&self) -> Box<dyn AsyncDataSource<A> + 'clone>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more