Trait uapi::NlmsgHeader

source ·
pub trait NlmsgHeader: Sized {
    // Required methods
    fn len(&self) -> Result<usize>;
    fn set_len(&mut self, len: usize) -> Result<()>;
}
👎Deprecated: beta features are subject to change at any time
Expand description

The general shape of a header of a netlink message

Note that this is not the same as c::nlmsghdr.

See also the crate documentation.

Required Methods§

source

fn len(&self) -> Result<usize>

👎Deprecated: beta features are subject to change at any time

Returns the length of the padded header + payload

This function returns an error if the length cannot be converted to usize without truncation.

source

fn set_len(&mut self, len: usize) -> Result<()>

👎Deprecated: beta features are subject to change at any time

Sets the length of the padded header + payload

This function returns an error if the length cannot be converted to the internal length type without truncation.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl NlmsgHeader for ()

source§

fn len(&self) -> Result<usize>

👎Deprecated: beta features are subject to change at any time
source§

fn set_len(&mut self, _len: usize) -> Result<()>

👎Deprecated: beta features are subject to change at any time

Implementors§