Struct cyfs_bdt::ndn::chunk::ChunkStreamCache
source · pub struct ChunkStreamCache(_);Implementations§
source§impl ChunkStreamCache
impl ChunkStreamCache
pub fn new(chunk: &ChunkId) -> Self
pub fn create_encoder(&self, desc: &ChunkCodecDesc) -> Box<dyn ChunkEncoder>
pub fn loaded(&self) -> bool
pub fn load( &self, finished: bool, raw_cache: Box<dyn RawCache> ) -> BuckyResult<()>
pub fn chunk(&self) -> &ChunkId
pub fn exists(&self, index: u32) -> BuckyResult<bool>
pub fn len(&self) -> usize
pub async fn wait_exists<T: Future<Output = BuckyError>>( &self, index: u32, abort: T ) -> BuckyResult<()>
pub async fn async_read<T: Future<Output = BuckyError>>( &self, piece_desc: &PieceDesc, offset_in_piece: usize, buffer: &mut [u8], abort: T ) -> BuckyResult<usize>
pub fn sync_try_read( &self, piece_desc: &PieceDesc, offset_in_piece: usize, buffer: &mut [u8] ) -> BuckyResult<usize>
Trait Implementations§
source§impl Clone for ChunkStreamCache
impl Clone for ChunkStreamCache
source§fn clone(&self) -> ChunkStreamCache
fn clone(&self) -> ChunkStreamCache
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