[−][src]Struct neli::types::RtBuffer
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>>ⓘ
[src]
Return an iterator over immutable references to the elements in the buffer.
pub fn iter_mut(&mut self) -> IterMut<'_, Rtattr<T, P>>ⓘ
[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]
pub fn from_iter<I>(i: I) -> Self where
I: IntoIterator<Item = Rtattr<T, P>>,
[src]
I: IntoIterator<Item = Rtattr<T, P>>,
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?
pub fn into_iter(self) -> Self::IntoIter
[src]
impl<T, P> Nl for RtBuffer<T, P> where
T: RtaType,
P: Nl,
[src]
T: RtaType,
P: Nl,
pub fn serialize(&self, mem: SerBuffer<'_>) -> Result<(), SerError>
[src]
pub fn deserialize(mem: DeBuffer<'_>) -> Result<Self, DeError>
[src]
pub fn size(&self) -> usize
[src]
pub fn type_size() -> Option<usize>
[src]
pub fn type_asize() -> Option<usize>
[src]
pub fn asize(&self) -> usize
[src]
pub fn pad(&self, mem: SerBuffer<'_>) -> Result<(), SerError>
[src]
Auto Trait Implementations
impl<T, P> RefUnwindSafe for RtBuffer<T, P> where
P: RefUnwindSafe,
T: RefUnwindSafe,
[src]
P: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, P> Send for RtBuffer<T, P> where
P: Send,
T: Send,
[src]
P: Send,
T: Send,
impl<T, P> Sync for RtBuffer<T, P> where
P: Sync,
T: Sync,
[src]
P: Sync,
T: Sync,
impl<T, P> Unpin for RtBuffer<T, P> where
P: Unpin,
T: Unpin,
[src]
P: Unpin,
T: Unpin,
impl<T, P> UnwindSafe for RtBuffer<T, P> where
P: UnwindSafe,
T: UnwindSafe,
[src]
P: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,