Struct neli::types::RtBuffer

source ·
pub struct RtBuffer<T, P>(_);
Expand description

A buffer of rtnetlink attributes.

Implementations§

Get a data structure with an immutable reference to the underlying Rtattrs.

Get a data structure with a mutable reference to the underlying Rtattrs.

Create a new buffer of routing netlink attributes.

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

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

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

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

Returns the number of elements in the buffer.

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

Trait Implementations§

Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
The type of the additional input.
Takes a byte buffer and an additional input and returns the deserialized data structure.
Creates a value from an iterator. Read more
The type of the elements being iterated over.
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
Size of the unpadded data structure. This will usually only be unaligned for variable length types like strings or byte buffers.
Get the size of of the payload and align it to the required netlink byte alignment.
Takes a byte buffer and serializes the data structure into it.
Pad a netlink message to the appropriate alignment.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.