vortex_io

Trait VortexRead

Source
pub trait VortexRead {
    // Required method
    fn read_bytes(&mut self, len: u64) -> impl Future<Output = Result<Bytes>>;
}
Expand description

An asynchronous streaming reader.

Implementations expose data via the asynchronous read_bytes, which will fill the exact number of bytes and advance the stream.

If the exact number of bytes is not available from the stream, an UnexpectedEof error is returned.

Required Methods§

Source

fn read_bytes(&mut self, len: u64) -> impl Future<Output = Result<Bytes>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl VortexRead for BytesMut

Source§

async fn read_bytes(&mut self, len: u64) -> Result<Bytes>

Source§

impl<R: VortexReadAt> VortexRead for Cursor<R>

Source§

async fn read_bytes(&mut self, len: u64) -> Result<Bytes>

Implementors§