pub trait ChunkReader {
// Required method
fn fetch_octets<'life0, 'async_trait>(
&'life0 self,
id: ResourceId,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, ChunkReaderError>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for reading chunks of data from a source.
This trait provides a platform-agnostic way to read data chunks, with different implementations for file system and WebAssembly environments.
Required Methods§
Sourcefn fetch_octets<'life0, 'async_trait>(
&'life0 self,
id: ResourceId,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, ChunkReaderError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_octets<'life0, 'async_trait>(
&'life0 self,
id: ResourceId,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, ChunkReaderError>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".