#[repr(C, packed(4))]pub struct TcRatespec {
pub cell_log: u8,
pub linklayer: u8,
pub overhead: u8,
pub cell_align: u8,
pub mpu: u8,
pub _pad_5: [u8; 3],
pub rate: u32,
}Available on crate feature
tc only.Fields§
§cell_log: u8§linklayer: u8§overhead: u8§cell_align: u8§mpu: u8§_pad_5: [u8; 3]§rate: u32Implementations§
Source§impl TcRatespec
impl TcRatespec
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 TcRatespec
impl Clone for TcRatespec
Source§impl Debug for TcRatespec
impl Debug for TcRatespec
Auto Trait Implementations§
impl Freeze for TcRatespec
impl RefUnwindSafe for TcRatespec
impl Send for TcRatespec
impl Sync for TcRatespec
impl Unpin for TcRatespec
impl UnsafeUnpin for TcRatespec
impl UnwindSafe for TcRatespec
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