Struct cyfs_bdt::ndn::chunk::ChunkCache
source · pub struct ChunkCache(_);Implementations§
source§impl ChunkCache
impl ChunkCache
pub fn to_weak(&self) -> WeakChunkCache
source§impl ChunkCache
impl ChunkCache
pub fn new(stack: Weak<StackImpl>, chunk: ChunkId) -> Self
pub async fn wait_loaded(&self) -> bool
pub fn chunk(&self) -> &ChunkId
pub fn stream(&self) -> &ChunkStreamCache
pub fn create_encoder(&self, desc: &ChunkCodecDesc) -> Box<dyn ChunkEncoder>
pub fn exists(&self, range: Range<usize>) -> Option<Range<usize>>
pub async fn wait_exists<T: Future<Output = BuckyError>, A: Fn() -> T>( &self, range: Range<usize>, abort: A ) -> BuckyResult<Range<usize>>
pub async fn read<T: Future<Output = BuckyError>, A: Fn() -> T>( &self, offset: usize, buffer: &mut [u8], abort: A ) -> BuckyResult<usize>
Trait Implementations§
source§impl Clone for ChunkCache
impl Clone for ChunkCache
source§fn clone(&self) -> ChunkCache
fn clone(&self) -> ChunkCache
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