pub struct NlBuffer<T, P>(/* private fields */);
Expand description
A buffer of netlink messages.
Implementations§
Source§impl<T, P> NlBuffer<T, P>
impl<T, P> NlBuffer<T, P>
Sourcepub fn push(&mut self, msg: Nlmsghdr<T, P>)
pub fn push(&mut self, msg: Nlmsghdr<T, P>)
Add a new netlink message to the end of the buffer.
Sourcepub fn pop(&mut self) -> Option<Nlmsghdr<T, P>>
pub fn pop(&mut self) -> Option<Nlmsghdr<T, P>>
Get a netlink message from the end of the buffer.
Sourcepub fn iter(&self) -> Iter<'_, Nlmsghdr<T, P>>
pub fn iter(&self) -> Iter<'_, Nlmsghdr<T, P>>
Return an iterator over immutable references to the elements in the buffer.
Trait Implementations§
Source§impl<'lifetime, T: NlType, P: FromBytesWithInput<'lifetime, Input = usize>> FromBytesWithInput<'lifetime> for NlBuffer<T, P>
impl<'lifetime, T: NlType, P: FromBytesWithInput<'lifetime, Input = usize>> FromBytesWithInput<'lifetime> for NlBuffer<T, P>
Source§impl<T, P> FromIterator<Nlmsghdr<T, P>> for NlBuffer<T, P>
impl<T, P> FromIterator<Nlmsghdr<T, P>> for NlBuffer<T, P>
Source§impl<T, P> IntoIterator for NlBuffer<T, P>
impl<T, P> IntoIterator for NlBuffer<T, P>
Source§impl<T: Size, P: Size> Size for NlBuffer<T, P>
impl<T: Size, P: Size> Size for NlBuffer<T, P>
Source§fn unpadded_size(&self) -> usize
fn unpadded_size(&self) -> usize
Size of the unpadded data structure. This will usually
only be unaligned for variable length types like
strings or byte buffers.
Source§fn padded_size(&self) -> usize
fn padded_size(&self) -> usize
Get the size of of the payload and align it to
the required netlink byte alignment.
impl<T: Eq, P: Eq> Eq for NlBuffer<T, P>
impl<T, P> StructuralPartialEq for NlBuffer<T, P>
Auto Trait Implementations§
impl<T, P> Freeze for NlBuffer<T, P>
impl<T, P> RefUnwindSafe for NlBuffer<T, P>where
T: RefUnwindSafe,
P: RefUnwindSafe,
impl<T, P> Send for NlBuffer<T, P>
impl<T, P> Sync for NlBuffer<T, P>
impl<T, P> Unpin for NlBuffer<T, P>
impl<T, P> UnwindSafe for NlBuffer<T, P>where
T: UnwindSafe,
P: UnwindSafe,
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