pub struct MsgHdr<'addr, 'bufs, 'control> { /* private fields */ }
Expand description
Configuration of a sendmsg(2)
system call.
This wraps msghdr
on Unix and WSAMSG
on Windows. Also see MsgHdrMut
for the variant used by recvmsg(2)
.
Implementations§
Source§impl<'addr, 'bufs, 'control> MsgHdr<'addr, 'bufs, 'control>
impl<'addr, 'bufs, 'control> MsgHdr<'addr, 'bufs, 'control>
Sourcepub fn with_addr(self, addr: &'addr SockAddr) -> Self
pub fn with_addr(self, addr: &'addr SockAddr) -> Self
Set the address (name) of the message.
Corresponds to setting msg_name
and msg_namelen
on Unix and name
and namelen
on Windows.
Sourcepub fn with_buffers(self, bufs: &'bufs [IoSlice<'_>]) -> Self
pub fn with_buffers(self, bufs: &'bufs [IoSlice<'_>]) -> Self
Set the buffer(s) of the message.
Corresponds to setting msg_iov
and msg_iovlen
on Unix and lpBuffers
and dwBufferCount
on Windows.
Sourcepub fn with_control(self, buf: &'control [u8]) -> Self
pub fn with_control(self, buf: &'control [u8]) -> Self
Set the control buffer of the message.
Corresponds to setting msg_control
and msg_controllen
on Unix and
Control
on Windows.
Sourcepub fn with_flags(self, flags: c_int) -> Self
pub fn with_flags(self, flags: c_int) -> Self
Set the flags of the message.
Corresponds to setting msg_flags
on Unix and dwFlags
on Windows.
Trait Implementations§
Auto Trait Implementations§
impl<'addr, 'bufs, 'control> Freeze for MsgHdr<'addr, 'bufs, 'control>
impl<'addr, 'bufs, 'control> RefUnwindSafe for MsgHdr<'addr, 'bufs, 'control>
impl<'addr, 'bufs, 'control> !Send for MsgHdr<'addr, 'bufs, 'control>
impl<'addr, 'bufs, 'control> !Sync for MsgHdr<'addr, 'bufs, 'control>
impl<'addr, 'bufs, 'control> Unpin for MsgHdr<'addr, 'bufs, 'control>
impl<'addr, 'bufs, 'control> UnwindSafe for MsgHdr<'addr, 'bufs, 'control>
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