Struct MsgHdr
#[repr(transparent)]
pub struct MsgHdr<'addr, 'bufs, 'control> { /* private fields */ }
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
impl<'addr, 'bufs, 'control> MsgHdr<'addr, 'bufs, 'control>
fn new() -> MsgHdr<'addr, 'bufs, 'control>Create a new
MsgHdrwith all empty/zero fields.fn with_addr(self, addr: &'addr SockAddr) -> SelfSet the address (name) of the message.
Corresponds to setting
msg_nameandmsg_namelenon Unix andnameandnamelenon Windows.fn with_buffers(self, bufs: &'bufs [IoSlice<'_>]) -> SelfSet the buffer(s) of the message.
Corresponds to setting
msg_iovandmsg_iovlenon Unix andlpBuffersanddwBufferCounton Windows.fn with_control(self, buf: &'control [u8]) -> SelfSet the control buffer of the message.
Corresponds to setting
msg_controlandmsg_controllenon Unix andControlon Windows.fn with_flags(self, flags: c_int) -> SelfSet the flags of the message.
Corresponds to setting
msg_flagson Unix anddwFlagson Windows.
Trait Implementations
impl Send for MsgHdr<'_, '_, '_>
impl<'name, 'bufs, 'control> Debug for MsgHdr<'name, 'bufs, 'control>
fn fmt(&self, fmt: &mut Formatter<'_>) -> Result