#[repr(C, packed(4))]pub struct Rtmsg {
pub rtm_family: u8,
pub rtm_dst_len: u8,
pub rtm_src_len: u8,
pub rtm_tos: u8,
pub rtm_table: u8,
pub rtm_protocol: u8,
pub rtm_scope: u8,
pub rtm_type: u8,
pub rtm_flags: u32,
}Available on crate feature
rt-route only.Fields§
§rtm_family: u8§rtm_dst_len: u8§rtm_src_len: u8§rtm_tos: u8§rtm_table: u8§rtm_protocol: u8§rtm_scope: u8§rtm_type: u8Associated type: RtmType (enum)
rtm_flags: u32Implementations§
Source§impl Rtmsg
impl Rtmsg
Sourcepub fn new_from_slice(other: &[u8]) -> Option<Self>
pub fn new_from_slice(other: &[u8]) -> Option<Self>
Copy from contents from slice
Sourcepub fn new_from_zeroed(other: &[u8]) -> Self
pub fn new_from_zeroed(other: &[u8]) -> Self
Copy from contents from another slice, padding with zeros or truncating when needed
pub fn new_from_array(buf: [u8; 12]) -> Self
pub fn as_slice(&self) -> &[u8] ⓘ
pub fn from_slice(buf: &[u8]) -> &Self
pub fn as_array(&self) -> &[u8; 12]
pub fn from_array(buf: &[u8; 12]) -> &Self
pub fn into_array(self) -> [u8; 12]
pub const fn len() -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Rtmsg
impl RefUnwindSafe for Rtmsg
impl Send for Rtmsg
impl Sync for Rtmsg
impl Unpin for Rtmsg
impl UnsafeUnpin for Rtmsg
impl UnwindSafe for Rtmsg
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