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) -> bool

Check 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_TRUNC flag. On Windows this corresponds to the WSAEMSGSIZE error code.

impl RecvFlags

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.

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.

const fn is_confirm(self) -> bool

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.

const fn is_dontroute(self) -> bool

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 Clone for RecvFlags

fn clone(&self) -> RecvFlags

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: &RecvFlags) -> bool

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 UnsafeUnpin for RecvFlags

impl UnwindSafe for RecvFlags

Blanket Implementations

impl<T> Any for RecvFlags where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for RecvFlags where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for RecvFlags where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for RecvFlags where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for RecvFlags

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for RecvFlags where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for RecvFlags where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for RecvFlags where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for RecvFlags where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>