#[repr(C, packed(4))]pub struct FibRuleHdr {
pub family: u8,
pub dst_len: u8,
pub src_len: u8,
pub tos: u8,
pub table: u8,
pub _res1: [u8; 1],
pub _res2: [u8; 1],
pub action: u8,
pub flags: u32,
}Available on crate feature
rt-rule only.Fields§
§family: u8§dst_len: u8§src_len: u8§tos: u8§table: u8§_res1: [u8; 1]§_res2: [u8; 1]§action: u8Associated type: FrAct (enum)
flags: u32Implementations§
Source§impl FibRuleHdr
impl FibRuleHdr
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§
Source§impl Clone for FibRuleHdr
impl Clone for FibRuleHdr
Source§impl Debug for FibRuleHdr
impl Debug for FibRuleHdr
Auto Trait Implementations§
impl Freeze for FibRuleHdr
impl RefUnwindSafe for FibRuleHdr
impl Send for FibRuleHdr
impl Sync for FibRuleHdr
impl Unpin for FibRuleHdr
impl UnsafeUnpin for FibRuleHdr
impl UnwindSafe for FibRuleHdr
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