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§
Sourcefn metadata<'async_trait>(
&'a mut self,
) -> Pin<Box<dyn Future<Output = Result<FileMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
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.
Sourcefn blob_reader(
&'a mut self,
blob_metadata: &BlobMetadata,
) -> Result<Self::Reader>
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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".