pub trait Queue: Send + InspectMut {
// Required methods
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<()>;
fn rx_avail(&mut self, done: &[RxId]);
fn rx_poll(&mut self, packets: &mut [RxId]) -> Result<usize>;
fn tx_avail(&mut self, segments: &[TxSegment]) -> Result<(bool, usize)>;
fn tx_poll(&mut self, done: &mut [TxId]) -> Result<usize>;
fn buffer_access(&mut self) -> Option<&mut dyn BufferAccess>;
// Provided method
fn update_target_vp<'life0, 'async_trait>(
&'life0 mut self,
target_vp: u32,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
A trait for sending and receiving network packets.
Required Methods§
Sourcefn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<()>
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<()>
Polls the queue for readiness.
Sourcefn tx_avail(&mut self, segments: &[TxSegment]) -> Result<(bool, usize)>
fn tx_avail(&mut self, segments: &[TxSegment]) -> Result<(bool, usize)>
Posts transmits to the device.
Returns Ok(false)
if the segments will complete asynchronously.
Sourcefn tx_poll(&mut self, done: &mut [TxId]) -> Result<usize>
fn tx_poll(&mut self, done: &mut [TxId]) -> Result<usize>
Polls the device for transmit completions.
Sourcefn buffer_access(&mut self) -> Option<&mut dyn BufferAccess>
fn buffer_access(&mut self) -> Option<&mut dyn BufferAccess>
Get the buffer access.