[][src]Trait neli::Nl

pub trait Nl: Sized {
    pub fn serialize(&self, m: SerBuffer<'_>) -> Result<(), SerError>;
pub fn deserialize(m: DeBuffer<'_>) -> Result<Self, DeError>;
pub fn type_size() -> Option<usize>;
pub fn size(&self) -> usize; pub fn type_asize() -> Option<usize> { ... }
pub fn asize(&self) -> usize { ... }
pub fn pad(&self, mem: SerBuffer<'_>) -> Result<(), SerError> { ... } }

Trait defining basic actions required for netlink communication. Implementations for basic and neli's types are provided (see below). Create new implementations if you have to work with a Netlink API that uses values of more unusual types.

Required methods

pub fn serialize(&self, m: SerBuffer<'_>) -> Result<(), SerError>[src]

Serialization method

pub fn deserialize(m: DeBuffer<'_>) -> Result<Self, DeError>[src]

Deserialization method

pub fn type_size() -> Option<usize>[src]

The size of the binary representation of a type not aligned to 4-byte boundary size

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

The size of the binary representation of an existing value not aligned to 4-byte boundary size

Loading content...

Provided methods

pub fn type_asize() -> Option<usize>[src]

The size of the binary representation of a type not aligned to 4-byte boundary size

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

The size of the binary representation of an existing value aligned to 4-byte boundary size

pub fn pad(&self, mem: SerBuffer<'_>) -> Result<(), SerError>[src]

Pad the data serialized data structure to alignment

Loading content...

Implementations on Foreign Types

impl<'a, T, P> Nl for &'a [Nlattr<T, P>] where
    T: NlAttrType,
    P: Nl
[src]

impl Nl for u8[src]

impl Nl for u16[src]

impl Nl for u32[src]

impl Nl for i32[src]

impl Nl for u64[src]

impl<'a> Nl for &'a [u8][src]

impl Nl for Vec<u8>[src]

impl<'a> Nl for &'a str[src]

impl Nl for String[src]

Loading content...

Implementors

impl Nl for CtrlAttr[src]

impl Nl for CtrlAttrMcastGrp[src]

impl Nl for CtrlCmd[src]

impl Nl for NlAttrTypeWrapper[src]

impl Nl for LogCfgCmdWrapper[src]

impl Nl for LogCmd[src]

impl Nl for LogCopyMode[src]

impl Nl for NetfilterMsg[src]

impl Nl for NfLogAttr[src]

impl Nl for NfLogCfg[src]

impl Nl for GenlId[src]

impl Nl for NlTypeWrapper[src]

impl Nl for NlmF[src]

impl Nl for Nlmsg[src]

impl Nl for Af[src]

impl Nl for Arphrd[src]

impl Nl for Ifa[src]

impl Nl for IfaF[src]

impl Nl for Iff[src]

impl Nl for Ifla[src]

impl Nl for IflaInfo[src]

impl Nl for Nda[src]

impl Nl for Ntf[src]

impl Nl for Nud[src]

impl Nl for RtAddrFamily[src]

impl Nl for RtScope[src]

impl Nl for RtTable[src]

impl Nl for Rta[src]

impl Nl for RtaTypeWrapper[src]

impl Nl for Rtm[src]

impl Nl for RtmF[src]

impl Nl for Rtn[src]

impl Nl for Rtprot[src]

impl Nl for Tca[src]

impl Nl for AddrFamily[src]

impl Nl for NlFamily[src]

impl Nl for Index[src]

impl Nl for NlmFFlags[src]

impl Nl for IfaFFlags[src]

impl Nl for IffFlags[src]

impl Nl for NtfFlags[src]

impl Nl for NudFlags[src]

impl Nl for RtmFFlags[src]

impl Nl for Ifaddrmsg[src]

impl Nl for Ifinfomsg[src]

impl Nl for NdaCacheinfo[src]

impl Nl for Ndmsg[src]

impl Nl for Rtgenmsg[src]

impl Nl for Rtmsg[src]

impl Nl for Tcmsg[src]

impl Nl for BeU64[src]

impl Nl for Buffer[src]

impl<C, T> Nl for Genlmsghdr<C, T> where
    C: Cmd,
    T: NlAttrType
[src]

impl<P> Nl for NlPayload<P> where
    P: Nl
[src]

impl<T> Nl for Nlmsgerr<T> where
    T: NlType
[src]

impl<T> Nl for NlmsghdrErr<T> where
    T: NlType
[src]

impl<T, P> Nl for Nlattr<T, P> where
    T: NlAttrType,
    P: Nl
[src]

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

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

impl<T, P> Nl for GenlBuffer<T, P> where
    T: NlAttrType,
    P: Nl + Debug
[src]

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

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

Loading content...