[][src]Struct neli::types::NlBuffer

pub struct NlBuffer<T, P>(_);

A buffer of netlink messages.

Implementations

impl<T, P> NlBuffer<T, P>[src]

pub fn new() -> Self[src]

Create a new buffer of netlink messages.

pub fn push(&mut self, msg: Nlmsghdr<T, P>)[src]

Add a new netlink message to the end of the buffer.

pub fn pop(&mut self) -> Option<Nlmsghdr<T, P>>[src]

Get a netlink message from the end of the buffer.

pub fn iter(&self) -> Iter<'_, Nlmsghdr<T, P>>

Notable traits for Iter<'a, T>

impl<'a, T> Iterator for Iter<'a, T> type Item = &'a T;
[src]

Return an iterator over immutable references to the elements in the buffer.

pub fn iter_mut(&mut self) -> IterMut<'_, Nlmsghdr<T, P>>

Notable traits for IterMut<'a, T>

impl<'a, T> Iterator for IterMut<'a, T> type Item = &'a mut T;
[src]

Return an iterator over mutable references to the elements in the buffer.

pub fn len(&self) -> usize[src]

Returns the number of elements in the buffer.

pub fn is_empty(&self) -> bool[src]

Returns whether the number of elements in the buffer is 0.

Trait Implementations

impl<T, P> AsRef<[Nlmsghdr<T, P>]> for NlBuffer<T, P>[src]

impl<T: Debug, P: Debug> Debug for NlBuffer<T, P>[src]

impl<T, P> Default for NlBuffer<T, P>[src]

impl<T, P> FromIterator<Nlmsghdr<T, P>> for NlBuffer<T, P>[src]

impl<T, P> IntoIterator for NlBuffer<T, P>[src]

type Item = Nlmsghdr<T, P>

The type of the elements being iterated over.

type IntoIter = <Vec<Nlmsghdr<T, P>> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?

impl<T, P> Nl for NlBuffer<T, P> where
    T: NlType,
    P: Nl
[src]

impl<T: PartialEq, P: PartialEq> PartialEq<NlBuffer<T, P>> for NlBuffer<T, P>[src]

impl<T, P> StructuralPartialEq for NlBuffer<T, P>[src]

Auto Trait Implementations

impl<T, P> RefUnwindSafe for NlBuffer<T, P> where
    P: RefUnwindSafe,
    T: RefUnwindSafe
[src]

impl<T, P> Send for NlBuffer<T, P> where
    P: Send,
    T: Send
[src]

impl<T, P> Sync for NlBuffer<T, P> where
    P: Sync,
    T: Sync
[src]

impl<T, P> Unpin for NlBuffer<T, P> where
    P: Unpin,
    T: Unpin
[src]

impl<T, P> UnwindSafe for NlBuffer<T, P> where
    P: UnwindSafe,
    T: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.