[][src]Struct neli::types::RtBuffer

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

A buffer of rtnetlink attributes.

Implementations

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

pub fn new() -> Self[src]

Create a new buffer of routing netlink attributes.

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

Add a new routing netlink attribute to the end of the buffer.

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

Get a routing netlink attribute from the end of the buffer.

pub fn iter(&self) -> Iter<'_, Rtattr<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<'_, Rtattr<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> AsMut<[Rtattr<T, P>]> for RtBuffer<T, P>[src]

impl<T, P> AsRef<[Rtattr<T, P>]> for RtBuffer<T, P>[src]

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

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

impl<T, P> FromIterator<Rtattr<T, P>> for RtBuffer<T, P>[src]

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

type Item = Rtattr<T, P>

The type of the elements being iterated over.

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

Which kind of iterator are we turning this into?

impl<T, P> Nl for RtBuffer<T, P> where
    T: RtaType,
    P: Nl
[src]

Auto Trait Implementations

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

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

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

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

impl<T, P> UnwindSafe for RtBuffer<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.