pub struct RecvFlags(_);
Expand description
Flags for incoming messages.
Flags provide additional information about incoming messages.
Implementations
sourceimpl 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.
sourceimpl RecvFlags
impl RecvFlags
sourcepub const fn is_truncated(self) -> bool
pub 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.
Trait Implementations
impl Copy for RecvFlags
impl Eq for RecvFlags
impl StructuralEq for RecvFlags
impl StructuralPartialEq for RecvFlags
Auto Trait Implementations
impl RefUnwindSafe for RecvFlags
impl Send for RecvFlags
impl Sync for RecvFlags
impl Unpin for RecvFlags
impl UnwindSafe for RecvFlags
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more