#[repr(C)]pub struct Message {
pub msg_name: *mut c_void,
pub msg_namelen: u32,
pub msg_iov: *mut iovec,
pub msg_iovlen: usize,
pub msg_control: *mut c_void,
pub msg_controllen: usize,
pub msg_flags: i32,
}Fields§
§msg_name: *mut c_void§msg_namelen: u32§msg_iov: *mut iovec§msg_iovlen: usize§msg_control: *mut c_void§msg_controllen: usize§msg_flags: i32Trait Implementations§
Source§impl Ext for msghdr
impl Ext for msghdr
type Encoder<'a> = MsghdrEncoder<'a>
fn header(&self) -> Option<(Header<Handle>, AncillaryData)>
fn cmsg_encoder(&mut self) -> Self::Encoder<'_>
fn remote_address(&self) -> Option<SocketAddress>
fn set_remote_address(&mut self, remote_address: &SocketAddress)
Source§impl Message for msghdr
impl Message for msghdr
const SUPPORTS_GSO: bool = true
const SUPPORTS_ECN: bool = true
const SUPPORTS_FLOW_LABELS: bool = true
type Handle = Handle
Source§fn alloc(entries: u32, payload_len: u32, offset: usize) -> Storage
fn alloc(entries: u32, payload_len: u32, offset: usize) -> Storage
Allocates
entries messages, each with payload_len bytesSource§fn payload_len(&self) -> usize
fn payload_len(&self) -> usize
Returns the length of the payload
Source§unsafe fn set_payload_len(&mut self, payload_len: usize)
unsafe fn set_payload_len(&mut self, payload_len: usize)
Sets the payload length for the message Read more
Source§fn set_segment_size(&mut self, size: usize)
fn set_segment_size(&mut self, size: usize)
Sets the segment size for the message payload
Source§fn payload_ptr_mut(&mut self) -> *mut u8
fn payload_ptr_mut(&mut self) -> *mut u8
Returns a mutable pointer for the message payload
Source§fn validate_replication(source: &Self, dest: &Self)
fn validate_replication(source: &Self, dest: &Self)
Source§fn rx_read(
&mut self,
local_address: &LocalAddress,
) -> Option<RxMessage<'_, Self::Handle>>
fn rx_read( &mut self, local_address: &LocalAddress, ) -> Option<RxMessage<'_, Self::Handle>>
Reads the message as an RX packet
Source§fn tx_write<M: Message<Handle = Self::Handle>>(
&mut self,
message: M,
) -> Result<usize, Error>
fn tx_write<M: Message<Handle = Self::Handle>>( &mut self, message: M, ) -> Result<usize, Error>
Writes the message into the TX packet
Source§fn payload_mut(&mut self) -> &mut [u8] ⓘ
fn payload_mut(&mut self) -> &mut [u8] ⓘ
Returns a mutable slice for the message payload
Source§impl UnixMessage for msghdr
impl UnixMessage for msghdr
fn send<E: SocketEvents>( fd: RawFd, entries: &mut [Self], events: &mut E, stats: &Sender, )
fn recv<E: SocketEvents>( fd: RawFd, ty: SocketType, entries: &mut [Self], events: &mut E, stats: &Sender, )
impl Copy for msghdr
Auto Trait Implementations§
impl Freeze for msghdr
impl RefUnwindSafe for msghdr
impl !Send for msghdr
impl !Sync for msghdr
impl Unpin for msghdr
impl UnwindSafe for msghdr
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)