Struct RecvFlags
pub struct RecvFlags(/* private field */);
Flags for incoming messages.
Flags provide additional information about incoming messages.
Implementations
impl RecvFlags
const fn is_truncated(self) -> boolCheck if the message contains a truncated datagram.
This flag is only used for datagram-based sockets, not for stream sockets.
On Unix this corresponds to the
MSG_TRUNCflag. On Windows this corresponds to theWSAEMSGSIZEerror code.
impl RecvFlags
const fn is_end_of_record(self) -> boolCheck if the message terminates a record.
Not all socket types support the notion of records. For socket types that do support it (such as
SEQPACKET), a record is terminated by sending a message with the end-of-record flag set.On Unix this corresponds to the
MSG_EORflag.const fn is_out_of_band(self) -> boolCheck if the message contains out-of-band data.
This is useful for protocols where you receive out-of-band data mixed in with the normal data stream.
On Unix this corresponds to the
MSG_OOBflag.const fn is_confirm(self) -> boolCheck if the confirm flag is set.
This is used by SocketCAN to indicate a frame was sent via the socket it is received on. This flag can be interpreted as a 'transmission confirmation'.
On Unix this corresponds to the
MSG_CONFIRMflag.const fn is_dontroute(self) -> boolCheck if the don't route flag is set.
This is used by SocketCAN to indicate a frame was created on the local host.
On Unix this corresponds to the
MSG_DONTROUTEflag.
Trait Implementations
impl Clone for RecvFlags
fn clone(&self) -> Self
impl Copy for RecvFlags
impl Debug for RecvFlags
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for RecvFlags
impl PartialEq for RecvFlags
fn eq(&self, other: &Self) -> bool