Skip to main content

NetworkRead

Trait NetworkRead 

Source
pub trait NetworkRead {
    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 network 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>>

Reads a packet into the provided buffer, returning its length.

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<'a, const QUEUE: usize, const MTU: usize> NetworkRead for LocalAppHandle<'a, QUEUE, MTU>

Source§

impl<L: DatalinkRead> NetworkRead for PointToPoint<L>

Source§

impl<N, G, A, C, const MTU: usize, const OUT: usize> NetworkRead for Router<N, G, A, C, MTU, OUT>
where N: Datalink, G: Datalink, A: RoutingAlgorithm, C: Clock,

Source§

impl<N, const MTU: usize, const OUT: usize> NetworkRead for Gossip<N, MTU, OUT>
where N: Datalink,