#[repr(transparent)]pub struct MMsgHdr<'a> {
    raw: mmsghdr,
    _phantom: PhantomData<&'a mut ()>,
}Expand description
An ABI-compatible wrapper for mmsghdr, for sending multiple messages with
sendmmsg.
Fields§
§raw: mmsghdr§_phantom: PhantomData<&'a mut ()>Implementations§
Source§impl<'a> MMsgHdr<'a>
 
impl<'a> MMsgHdr<'a>
Sourcepub fn new(
    iov: &'a [IoSlice<'_>],
    control: &'a mut SendAncillaryBuffer<'_, '_, '_>,
) -> Self
 
pub fn new( iov: &'a [IoSlice<'_>], control: &'a mut SendAncillaryBuffer<'_, '_, '_>, ) -> Self
Constructs a new message with no destination address.
Sourcepub fn new_with_addr(
    addr: &'a SocketAddrAny,
    iov: &'a [IoSlice<'_>],
    control: &'a mut SendAncillaryBuffer<'_, '_, '_>,
) -> Self
 
pub fn new_with_addr( addr: &'a SocketAddrAny, iov: &'a [IoSlice<'_>], control: &'a mut SendAncillaryBuffer<'_, '_, '_>, ) -> Self
Constructs a new message to a specific address.
This requires a SocketAddrAny instead of using impl SocketAddrArg;
to obtain a SocketAddrAny, use SocketAddrArg::as_any.
fn wrap(msg_hdr: msghdr) -> Self
Sourcepub fn bytes_sent(&self) -> usize
 
pub fn bytes_sent(&self) -> usize
Returns the number of bytes sent. This will return 0 until after a successful call to sendmmsg.
Auto Trait Implementations§
impl<'a> Freeze for MMsgHdr<'a>
impl<'a> RefUnwindSafe for MMsgHdr<'a>
impl<'a> !Send for MMsgHdr<'a>
impl<'a> !Sync for MMsgHdr<'a>
impl<'a> Unpin for MMsgHdr<'a>
impl<'a> !UnwindSafe for MMsgHdr<'a>
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