Skip to main content

TransportRead

Trait TransportRead 

Source
pub trait TransportRead {
    type Error;

    // Required method
    async fn read(&mut self, data: &mut [u8]) -> Result<usize, Self::Error>;
}
Expand description

Async byte input: fills data and returns how many bytes were read.

Required Associated Types§

Required Methods§

Source

async fn read(&mut self, data: &mut [u8]) -> Result<usize, Self::Error>

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.

Implementors§