Struct neli::genlhdr::GenlHdr
[−]
[src]
pub struct GenlHdr<C> { pub cmd: C, pub version: u8, // some fields omitted }
Struct representing generic netlink header and payload
Fields
cmd: C
Generic netlink message command
version: u8
Version of generic netlink family protocol
Methods
impl<C> GenlHdr<C> where
C: From<u8> + Into<u8>,
[src]
C: From<u8> + Into<u8>,
pub fn new<T>(
cmd: C,
version: u8,
attrs: Vec<NlAttrHdr<T>>
) -> Result<Self, SerError> where
T: Nl + Into<u16> + From<u16>,
[src]
cmd: C,
version: u8,
attrs: Vec<NlAttrHdr<T>>
) -> Result<Self, SerError> where
T: Nl + Into<u16> + From<u16>,
Create new generic netlink packet
pub fn get_attr_handle<T>(&self) -> AttrHandle<T> where
T: Nl + Into<u16> + From<u16>,
[src]
T: Nl + Into<u16> + From<u16>,
Get handle for attribute parsing and traversal
Trait Implementations
impl<C: Debug> Debug for GenlHdr<C>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<C: PartialEq> PartialEq for GenlHdr<C>
[src]
fn eq(&self, __arg_0: &GenlHdr<C>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &GenlHdr<C>) -> bool
[src]
This method tests for !=
.
impl<C> Nl for GenlHdr<C> where
C: Nl + From<u8> + Into<u8>,
[src]
C: Nl + From<u8> + Into<u8>,
type SerIn = ()
Serialization input type for stateful serialization - set to ()
for stateless serialization Read more
type DeIn = ()
Deserialization input type for stateful deserialization - set to ()
for stateless deserialization Read more
fn serialize(&self, cur: &mut MemWrite) -> Result<(), SerError>
[src]
Serialization method
fn deserialize(mem: &mut MemRead) -> Result<Self, DeError>
[src]
Stateless deserialization method
fn size(&self) -> usize
[src]
The size of the binary representation of a struct - not aligned to word size
fn serialize_with(
&self,
_m: &mut MemWrite,
_in: Self::SerIn
) -> Result<(), SerError>
[src]
&self,
_m: &mut MemWrite,
_in: Self::SerIn
) -> Result<(), SerError>
Serialization method
fn deserialize_with(_m: &mut MemRead, _in: Self::DeIn) -> Result<Self, DeError>
[src]
Stateful deserialization method
fn asize(&self) -> usize
[src]
The size of the binary representation of a struct - aligned to word size