[][src]Trait ethox::nic::Handle

pub trait Handle {
    fn queue(&mut self) -> Result<()>;
fn info(&self) -> &dyn Info; }

A controller for the network operations of the payload buffer.

Provides the meta data of the payload. This trait is split from the main payload since it must be possible to use its method even while the payload itself is borrowed (e.g. within a parsed packet representation).

Required methods

fn queue(&mut self) -> Result<()>

Queue this packet to be sent.

This operation may fail for cards that can only send packets that have been previously allocated for that specific purpose and can, for lack of logic for this, not implement ad-hoc allocation for this purpose. Another reason for failure is simply a lack of resources to queue the packet.

fn info(&self) -> &dyn Info

Information on the packet intended for lower layers.

Note that technically the information may change after a call to queue or in the future after changing the target interface of an outgoing packet. That is intentional.

Loading content...

Implementors

impl Handle for EnqueueFlag[src]

impl Handle for ethox::nic::external::Handle[src]

impl Handle for ethox::nic::loopback::Handle[src]

impl<H: Handle + ?Sized> Handle for LossyHandle<H>[src]

Loading content...