Struct nix::sys::socket::MsgFlags [−][src]
pub struct MsgFlags { /* fields omitted */ }
Expand description
Flags for send/recv and their relatives
Implementations
Sends or requests out-of-band data on sockets that support this notion
(e.g., of type Stream
); the underlying protocol must also
support out-of-band data.
Peeks at an incoming message. The data is treated as unread and the next
recv()
or similar function shall still return this data.
Receive operation blocks until the full amount of data can be returned. The function may return smaller amount of data if a signal is caught, an error or disconnect occurs.
Enables nonblocking operation; if the operation would block,
EAGAIN
or EWOULDBLOCK
is returned. This provides similar
behavior to setting the O_NONBLOCK
flag
(via the fcntl
F_SETFL
operation), but differs in that MSG_DONTWAIT
is a per-
call option, whereas O_NONBLOCK
is a setting on the open file
description (see open(2)),
which will affect all threads in
the calling process and as well as other processes that hold
file descriptors referring to the same open file description.
Receive flags: Control Data was discarded (buffer too small)
For raw (Packet
), Internet datagram
(since Linux 2.4.27/2.6.8),
netlink (since Linux 2.6.22) and UNIX datagram (since Linux 3.4)
sockets: return the real length of the packet or datagram, even
when it was longer than the passed buffer. Not implemented for UNIX
domain (unix(7)) sockets.
For use with Internet stream sockets, see tcp(7).
Terminates a record (when this notion is supported, as for
sockets of type SeqPacket
).
This flag specifies that queued errors should be received from the socket error queue. (For more details, see recvfrom(2))
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Returns true
if there are flags common to both self
and other
.
Returns true
all of the flags in other
are contained within self
.
Trait Implementations
Disables all flags disabled in the set.
Adds the set of flags.
Toggles the set of flags.
Extends a collection with the contents of an iterator. Read more
extend_one
)Extends a collection with exactly one element.
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Disables all flags enabled in the set.
Auto Trait Implementations
impl RefUnwindSafe for MsgFlags
impl UnwindSafe for MsgFlags
Blanket Implementations
Mutably borrows from an owned value. Read more