Struct smoltcp::socket::UdpSocketBuffer
[−]
[src]
pub struct UdpSocketBuffer<'a, 'b: 'a> { /* fields omitted */ }
An UDP packet ring buffer.
Methods
impl<'a, 'b> SocketBuffer<'a, 'b>
[src]
fn new<T>(storage: T) -> SocketBuffer<'a, 'b> where T: Into<Managed<'a, [PacketBuffer<'b>]>>
Create a packet buffer with the given storage.
fn empty(&self) -> bool
Query whether the buffer is empty.
fn full(&self) -> bool
Query whether the buffer is full.
fn enqueue(&mut self) -> Result<&mut PacketBuffer<'b>, ()>
Enqueue an element into the buffer, and return a pointer to it, or return
Err(())
if the buffer is full.
fn dequeue(&mut self) -> Result<&PacketBuffer<'b>, ()>
Dequeue an element from the buffer, and return a pointer to it, or return
Err(())
if the buffer is empty.