pub struct Message { /* private fields */ }Expand description
A simple message type that holds an address and payload
All other fields are not supported by the platform.
Implementations§
Source§impl Message
impl Message
pub fn remote_address(&self) -> &SocketAddress
pub fn set_remote_address(&mut self, remote_address: &SocketAddress)
Trait Implementations§
Source§impl Message for Message
impl Message for Message
const SUPPORTS_GSO: bool = false
const SUPPORTS_ECN: bool = false
const SUPPORTS_FLOW_LABELS: bool = false
type Handle = Tuple
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 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§fn set_segment_size(&mut self, _size: usize)
fn set_segment_size(&mut self, _size: usize)
Sets the segment size for the message payload
impl Copy for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl !Send for Message
impl !Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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)