[][src]Trait ethox::nic::Recv

pub trait Recv<H: Handle + ?Sized, P: Payload + ?Sized> {
    fn receive(&mut self, packet: Packet<H, P>);

    fn receivev<'a>(
        &mut self,
        packets: impl IntoIterator<Item = Packet<'a, H, P>>
    )
    where
        P: 'a,
        H: 'a
, { ... } }

A raw network packet receiver.

Required methods

fn receive(&mut self, packet: Packet<H, P>)

Receive a single packet.

Some Packet types will allow you not only to access but also modify their contents (i.e. they also implement AsMut<[u8]>

Loading content...

Provided methods

fn receivev<'a>(&mut self, packets: impl IntoIterator<Item = Packet<'a, H, P>>) where
    P: 'a,
    H: 'a, 

Vectored receive.

The default implementation will simply receive all packets in sequence.

Loading content...

Implementors

impl<'_, '_, H, P, T> Recv<H, P> for Receiver<'_, '_, T> where
    H: Handle,
    P: Payload,
    T: Recv<P>, 
[src]

impl<'_, F, H: Handle + ?Sized, P: Payload + ?Sized> Recv<H, P> for &'_ mut F where
    F: Recv<H, P>, 
[src]

impl<'_, H: ?Sized, P: ?Sized, I> Recv<H, P> for Lossy<'_, I> where
    H: Handle,
    P: Payload,
    I: Recv<LossyHandle<H>, P>, 
[src]

impl<F, H: Handle + ?Sized, P: Payload + ?Sized> Recv<H, P> for FnHandler<F> where
    F: FnMut(Packet<H, P>), 
[src]

Loading content...