pub trait DataSource<A: Digest>: DynClone + Debug + Sync + Send {
    fn slice(&self, size: PartSize) -> IoResult<Option<DataSourceReader>>;
    fn reset(&self) -> IoResult<()>;
    fn total_size(&self) -> IoResult<Option<u64>>;

    fn source_key(&self) -> IoResult<Option<SourceKey<A>>> { ... }
}
Expand description

数据源接口

提供上传所用的数据源

该 Trait 的异步版本为 AsyncDataSource

Required Methods

数据源切片

重置数据源

获取数据源大小

Provided Methods

获取数据源 KEY

用于区分不同的数据源

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Implementations on Foreign Types

Implementors