Skip to main content

CodingRead

Trait CodingRead 

Source
pub trait CodingRead {
    type Error: Error;

    // Required method
    fn read(
        &mut self,
        buffer: &mut [u8],
    ) -> impl Future<Output = Result<usize, Self::Error>>;
}
Expand description

Reads coded bytes from the physical layer, decodes them, and returns the transfer frame.

Required Associated Types§

Source

type Error: Error

Error type for read operations.

Required Methods§

Source

fn read( &mut self, buffer: &mut [u8], ) -> impl Future<Output = Result<usize, Self::Error>>

Reads and decodes a transfer frame into buffer.

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§

Source§

impl<R, D, F, P, const BUF: usize> CodingRead for CodingReader<R, D, F, P, BUF>