pub struct RecvFlags(/* private fields */);
Expand description
Flags for incoming messages.
Flags provide additional information about incoming messages.
Implementations§
Source§impl RecvFlags
impl RecvFlags
Unix-only API.
Sourcepub const fn is_end_of_record(self) -> bool
pub const fn is_end_of_record(self) -> bool
Check 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_EOR
flag.
Sourcepub const fn is_out_of_band(self) -> bool
pub const fn is_out_of_band(self) -> bool
Check 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_OOB
flag.
Sourcepub const fn is_confirm(self) -> bool
Available on crate feature all
and (Android or Linux) only.
pub const fn is_confirm(self) -> bool
all
and (Android or Linux) only.Check 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_CONFIRM
flag.
Sourcepub const fn is_dontroute(self) -> bool
Available on crate feature all
and (Android or Linux) only.
pub const fn is_dontroute(self) -> bool
all
and (Android or Linux) only.Check 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_DONTROUTE
flag.
Trait Implementations§
impl Copy for RecvFlags
impl Eq for RecvFlags
impl StructuralPartialEq for RecvFlags
Auto Trait Implementations§
impl Freeze for RecvFlags
impl RefUnwindSafe for RecvFlags
impl Send for RecvFlags
impl Sync for RecvFlags
impl Unpin for RecvFlags
impl UnwindSafe for RecvFlags
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 4 bytes