pub trait DataSource<A: Digest>: Debug + Sync + Send {
    fn slice(&self, size: PartSize) -> IoResult<Option<DataSourceReader>>;
    fn async_slice(
        &self,
        size: PartSize
    ) -> BoxFuture<'_, IoResult<Option<AsyncDataSourceReader>>>; fn total_size(&self) -> IoResult<Option<u64>>; fn source_key(&self) -> IoResult<Option<SourceKey<A>>> { ... } fn async_source_key(&self) -> BoxFuture<'_, IoResult<Option<SourceKey<A>>>> { ... } fn async_total_size(&self) -> BoxFuture<'_, IoResult<Option<u64>>> { ... } }
Expand description

数据源接口

提供上传所用的数据源

Required methods

数据源切片

This is supported on crate feature async only.

异步数据源切片

获取数据源大小

Provided methods

获取数据源 KEY

用于区分不同的数据源

This is supported on crate feature async only.

异步获取数据源 KEY

用于区分不同的数据源

This is supported on crate feature async only.

异步获取数据源大小

Implementations on Foreign Types

数据源切片

This is supported on crate feature async only.

异步数据源切片

获取数据源 KEY

用于区分不同的数据源

This is supported on crate feature async only.

异步获取数据源 KEY

用于区分不同的数据源

获取数据源大小

This is supported on crate feature async only.

异步获取数据源大小

数据源切片

This is supported on crate feature async only.

异步数据源切片

获取数据源 KEY

用于区分不同的数据源

This is supported on crate feature async only.

异步获取数据源 KEY

用于区分不同的数据源

获取数据源大小

This is supported on crate feature async only.

异步获取数据源大小

数据源切片

This is supported on crate feature async only.

异步数据源切片

获取数据源 KEY

用于区分不同的数据源

This is supported on crate feature async only.

异步获取数据源 KEY

用于区分不同的数据源

获取数据源大小

This is supported on crate feature async only.

异步获取数据源大小

数据源切片

This is supported on crate feature async only.

异步数据源切片

获取数据源 KEY

用于区分不同的数据源

This is supported on crate feature async only.

异步获取数据源 KEY

用于区分不同的数据源

获取数据源大小

This is supported on crate feature async only.

异步获取数据源大小

数据源切片

This is supported on crate feature async only.

异步数据源切片

获取数据源 KEY

用于区分不同的数据源

This is supported on crate feature async only.

异步获取数据源 KEY

用于区分不同的数据源

获取数据源大小

This is supported on crate feature async only.

异步获取数据源大小

Implementors