pub trait ContentReader {
// Required method
fn read_chunk(
&self,
) -> ContentFuture<'_, Result<Option<Vec<u8>>, ContentError>>;
}Expand description
A pull reader over one piece of content.
Each read_chunk resolves to the next chunk of
bytes, or None once the content is exhausted. Chunk sizes are chosen by the
provider; framework readers use DEFAULT_CHUNK_LEN.
Required Methods§
Sourcefn read_chunk(&self) -> ContentFuture<'_, Result<Option<Vec<u8>>, ContentError>>
fn read_chunk(&self) -> ContentFuture<'_, Result<Option<Vec<u8>>, ContentError>>
Resolves to the next chunk, or None at end of content.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".