[−][src]Struct xsk_rs::RxQueue
The receiving side of an AF_XDP socket.
More details can be found in the docs.
Implementations
impl RxQueue<'_>
[src]
pub fn consume(&mut self, descs: &mut [FrameDesc<'_>]) -> usize
[src]
Populate descs
with information on packets received on the
rx ring.
The number of entries updated will be less than or equal to
the length of descs
. Entries will be updated sequentially
from the start of descs
until the end. Returns the number
of elements of descs
which have been updated with received
packet information, namely their frame address and length.
Once the contents of the consumed frames have been dealt with and are no longer required, the frames should eventually be added back on to either the FillQueue or the TxQueue.
pub fn poll_and_consume(
&mut self,
descs: &mut [FrameDesc<'_>],
poll_timeout: i32
) -> Result<usize>
[src]
&mut self,
descs: &mut [FrameDesc<'_>],
poll_timeout: i32
) -> Result<usize>
Same as consume
but poll first to check if there is anything
to read beforehand.
pub fn fd(&mut self) -> &mut Fd
[src]
Return the AF_XDP socket's file descriptor.
Required for poll_read or poll_write.
Trait Implementations
Auto Trait Implementations
impl<'umem> RefUnwindSafe for RxQueue<'umem>
[src]
impl<'umem> !Sync for RxQueue<'umem>
[src]
impl<'umem> Unpin for RxQueue<'umem>
[src]
impl<'umem> UnwindSafe for RxQueue<'umem>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,