pub struct Message {
pub family: u16,
pub command: u8,
pub version: u8,
pub flags: MessageFlags,
pub attributes: Vec<Attribute>,
}Expand description
Netlink generic message
Fields§
§family: u16Family identifier, Message to or from this subsystem
command: u8Command to send or receive
version: u8Message version
flags: MessageFlagsMessage flags
attributes: Vec<Attribute>Message attributes
Implementations§
Source§impl Message
impl Message
Sourcepub fn new<F: Into<u16>, C: Into<u8>, M: Into<MessageFlags>>(
family: F,
command: C,
mode: M,
) -> Message
pub fn new<F: Into<u16>, C: Into<u8>, M: Into<MessageFlags>>( family: F, command: C, mode: M, ) -> Message
Create a new message
Sourcepub fn set_flags(&mut self, flags: MessageFlags)
pub fn set_flags(&mut self, flags: MessageFlags)
Set message flags
Sourcepub fn append_attribute(&mut self, attr: Attribute)
pub fn append_attribute(&mut self, attr: Attribute)
Append a attribute to the message
Trait Implementations§
Source§impl SendMessage for Message
impl SendMessage for Message
Source§fn pack(&self, data: &mut [u8]) -> Result<usize>
fn pack(&self, data: &mut [u8]) -> Result<usize>
Pack the message into the provided byte slice
Source§fn message_type(&self) -> u16
fn message_type(&self) -> u16
Get the message type
Source§fn query_flags(&self) -> MessageFlags
fn query_flags(&self) -> MessageFlags
Get the query flags
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more