ChunkReader

Trait ChunkReader 

Source
pub trait ChunkReader:
    'static
    + Send
    + Sync {
    // Required methods
    fn clone_as_reader(&self) -> Box<dyn ChunkReader>;
    fn exists<'life0, 'life1, 'async_trait>(
        &'life0 self,
        chunk: &'life1 ChunkId,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get<'life0, 'life1, 'async_trait>(
        &'life0 self,
        chunk: &'life1 ChunkId,
    ) -> Pin<Box<dyn Future<Output = BuckyResult<Box<dyn AsyncReadWithSeek + Unpin + Send + Sync>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn clone_as_reader(&self) -> Box<dyn ChunkReader>

Source

fn exists<'life0, 'life1, 'async_trait>( &'life0 self, chunk: &'life1 ChunkId, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get<'life0, 'life1, 'async_trait>( &'life0 self, chunk: &'life1 ChunkId, ) -> Pin<Box<dyn Future<Output = BuckyResult<Box<dyn AsyncReadWithSeek + Unpin + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§