pub struct BatchScratch { /* private fields */ }Expand description
Reusable working memory for recv_batch.
The kernel needs an array of headers, one address slot and one control
block per datagram. None of it carries information between calls – it is
all overwritten by the next recvmmsg – so it is allocated once by the
caller and reused, exactly as the packet buffers already are, instead of
being built and thrown away on every receive.
Implementations§
Source§impl BatchScratch
impl BatchScratch
Sourcepub fn without_timestamps() -> Self
pub fn without_timestamps() -> Self
Scratch for a caller that does not read Received::kernel_rx_ns.
Trait Implementations§
Auto Trait Implementations§
impl !Send for BatchScratch
impl !Sync for BatchScratch
impl Freeze for BatchScratch
impl RefUnwindSafe for BatchScratch
impl Unpin for BatchScratch
impl UnsafeUnpin for BatchScratch
impl UnwindSafe for BatchScratch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more