Skip to main content

ByteRead

Trait ByteRead 

Source
pub trait ByteRead {
    // Required method
    fn read<'a>(
        &'a mut self,
        buf: &'a mut [u8],
    ) -> impl Future<Output = TransportResult<usize>> + Send + 'a;
}
Expand description

The read half of a split stream.

Required Methods§

Source

fn read<'a>( &'a mut self, buf: &'a mut [u8], ) -> impl Future<Output = TransportResult<usize>> + Send + 'a

Read into buf, returning the byte count; Ok(0) is EOF.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§