pub struct GenlBuffer<T, P>(/* private fields */);
Expand description
A buffer of generic netlink attributes.
Implementations§
Source§impl<T> GenlBuffer<T, Buffer>
impl<T> GenlBuffer<T, Buffer>
Sourcepub fn get_attr_handle(&self) -> AttrHandle<'_, Self, Nlattr<T, Buffer>>
pub fn get_attr_handle(&self) -> AttrHandle<'_, Self, Nlattr<T, Buffer>>
Get a data structure with an immutable reference to the
underlying Nlattr
s.
Source§impl GenlBuffer<u16, Buffer>
impl GenlBuffer<u16, Buffer>
Sourcepub fn get_typed_attr_handle<T>(&self) -> Result<GenlAttrHandle<'_, T>, DeError>where
T: NlAttrType,
pub fn get_typed_attr_handle<T>(&self) -> Result<GenlAttrHandle<'_, T>, DeError>where
T: NlAttrType,
Convert a GenlBuffer
that can represent all types to a buffer that
is of a particular type.
Source§impl<T, P> GenlBuffer<T, P>
impl<T, P> GenlBuffer<T, P>
Sourcepub fn push(&mut self, attr: Nlattr<T, P>)
pub fn push(&mut self, attr: Nlattr<T, P>)
Add a new generic netlink attribute to the end of the buffer.
Sourcepub fn pop(&mut self) -> Option<Nlattr<T, P>>
pub fn pop(&mut self) -> Option<Nlattr<T, P>>
Get a generic netlink attribute from the end of the buffer.
Sourcepub fn iter(&self) -> Iter<'_, Nlattr<T, P>>
pub fn iter(&self) -> Iter<'_, Nlattr<T, P>>
Return an iterator over immutable references to the elements in the buffer.
Trait Implementations§
Source§impl<T, P> AsMut<[Nlattr<T, P>]> for GenlBuffer<T, P>
impl<T, P> AsMut<[Nlattr<T, P>]> for GenlBuffer<T, P>
Source§impl<T, P> AsRef<[Nlattr<T, P>]> for GenlBuffer<T, P>
impl<T, P> AsRef<[Nlattr<T, P>]> for GenlBuffer<T, P>
Source§impl<T: Clone, P: Clone> Clone for GenlBuffer<T, P>
impl<T: Clone, P: Clone> Clone for GenlBuffer<T, P>
Source§fn clone(&self) -> GenlBuffer<T, P>
fn clone(&self) -> GenlBuffer<T, P>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T, P> Default for GenlBuffer<T, P>
impl<T, P> Default for GenlBuffer<T, P>
Source§impl<T: NlAttrType, P: FromBytesWithInput<Input = usize>> FromBytesWithInput for GenlBuffer<T, P>
impl<T: NlAttrType, P: FromBytesWithInput<Input = usize>> FromBytesWithInput for GenlBuffer<T, P>
Source§impl<T, P> FromIterator<Nlattr<T, P>> for GenlBuffer<T, P>
impl<T, P> FromIterator<Nlattr<T, P>> for GenlBuffer<T, P>
Source§impl<T, P> IntoIterator for GenlBuffer<T, P>
impl<T, P> IntoIterator for GenlBuffer<T, P>
Source§impl<T, P> Size for GenlBuffer<T, P>
impl<T, P> Size for GenlBuffer<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 the payload and align it to
the required netlink byte alignment.
Source§impl<T: NlAttrType, P: ToBytes> ToBytes for GenlBuffer<T, P>
impl<T: NlAttrType, P: ToBytes> ToBytes for GenlBuffer<T, P>
impl<T: Eq, P: Eq> Eq for GenlBuffer<T, P>
impl<T, P> StructuralPartialEq for GenlBuffer<T, P>
Auto Trait Implementations§
impl<T, P> Freeze for GenlBuffer<T, P>
impl<T, P> RefUnwindSafe for GenlBuffer<T, P>where
P: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, P> Send for GenlBuffer<T, P>
impl<T, P> Sync for GenlBuffer<T, P>
impl<T, P> Unpin for GenlBuffer<T, P>
impl<T, P> UnwindSafe for GenlBuffer<T, P>where
P: UnwindSafe,
T: 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