#[repr(C)]pub struct Message {
pub msg_hdr: msghdr,
pub msg_len: u32,
}Fields§
§msg_hdr: msghdr§msg_len: u32Trait Implementations§
Source§impl Message for mmsghdr
impl Message for mmsghdr
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, len: usize)
unsafe fn set_payload_len(&mut self, 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 mmsghdr
impl UnixMessage for mmsghdr
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 mmsghdr
Auto Trait Implementations§
impl Freeze for mmsghdr
impl RefUnwindSafe for mmsghdr
impl !Send for mmsghdr
impl !Sync for mmsghdr
impl Unpin for mmsghdr
impl UnwindSafe for mmsghdr
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)