puffin::file_format::reader

Trait AsyncReader

Source
pub trait AsyncReader<'a> {
    type Reader: RangeReader;

    // Required methods
    fn metadata<'async_trait>(
        &'a mut self,
    ) -> Pin<Box<dyn Future<Output = Result<FileMetadata>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait;
    fn blob_reader(
        &'a mut self,
        blob_metadata: &BlobMetadata,
    ) -> Result<Self::Reader>;
}
Expand description

AsyncReader defines an asynchronous reader for puffin data.

Required Associated Types§

Required Methods§

Source

fn metadata<'async_trait>( &'a mut self, ) -> Pin<Box<dyn Future<Output = Result<FileMetadata>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait,

Fetches the FileMetadata.

Source

fn blob_reader( &'a mut self, blob_metadata: &BlobMetadata, ) -> Result<Self::Reader>

Reads particular blob data based on given metadata.

Data read from the reader is compressed leaving the caller to decompress the data.

Implementors§