Skip to main content

DatalinkRead

Trait DatalinkRead 

Source
pub trait DatalinkRead {
    type Error: Error;

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

Receive direction of the data link layer.

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>>

Read data from the link 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.

Implementations on Foreign Types§

Source§

impl<T: DatalinkRead + ?Sized> DatalinkRead for &mut T

Source§

type Error = <T as DatalinkRead>::Error

Source§

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

Implementors§