#[repr(C, packed(4))]pub struct Msg {
pub family: u8,
pub state: u8,
pub timer: u8,
pub retrans: u8,
pub sockid: Sockid,
pub expires: u32,
pub rqueue: u32,
pub wqueue: u32,
pub uid: u32,
pub inode: u32,
}Available on crate feature
inet-diag only.Expand description
Base info structure. It contains socket identity (addrs/ports/cookie) and, alas, the information shown by netstat.
Fields§
§family: u8§state: u8Associated type: TcpState (enum)
timer: u8§retrans: u8§sockid: Sockid§expires: u32§rqueue: u32§wqueue: u32§uid: u32§inode: u32Implementations§
Source§impl Msg
impl Msg
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; 72]) -> Self
pub fn as_slice(&self) -> &[u8] ⓘ
pub fn from_slice(buf: &[u8]) -> &Self
pub fn as_array(&self) -> &[u8; 72]
pub fn from_array(buf: &[u8; 72]) -> &Self
pub fn into_array(self) -> [u8; 72]
pub const fn len() -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Msg
impl RefUnwindSafe for Msg
impl Send for Msg
impl Sync for Msg
impl Unpin for Msg
impl UnsafeUnpin for Msg
impl UnwindSafe for Msg
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