pub struct ReturnFlags(/* private fields */);Implementations§
Source§impl ReturnFlags
impl ReturnFlags
Sourcepub const OOB: ReturnFlags
pub const OOB: ReturnFlags
MSG_OOB
Sourcepub const EOR: ReturnFlags
pub const EOR: ReturnFlags
MSG_EOR
Sourcepub const TRUNC: ReturnFlags
pub const TRUNC: ReturnFlags
MSG_TRUNC
Sourcepub const CTRUNC: ReturnFlags
pub const CTRUNC: ReturnFlags
MSG_CTRUNC
Sourcepub const ERRQUEUE: ReturnFlags
pub const ERRQUEUE: ReturnFlags
MSG_ERRQUEUE
Sourcepub const CMSG_CLOEXEC: ReturnFlags
pub const CMSG_CLOEXEC: ReturnFlags
MSG_CMSG_CLOEXEC
Source§impl ReturnFlags
impl ReturnFlags
Sourcepub const fn empty() -> ReturnFlags
pub const fn empty() -> ReturnFlags
Get a flags value with all bits unset.
Sourcepub const fn all() -> ReturnFlags
pub const fn all() -> ReturnFlags
Get a flags value with all known bits set.
Sourcepub const fn bits(&self) -> u32
pub const fn bits(&self) -> u32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: u32) -> Option<ReturnFlags>
pub const fn from_bits(bits: u32) -> Option<ReturnFlags>
Convert from a bits value.
This method will return None if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u32) -> ReturnFlags
pub const fn from_bits_truncate(bits: u32) -> ReturnFlags
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u32) -> ReturnFlags
pub const fn from_bits_retain(bits: u32) -> ReturnFlags
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<ReturnFlags>
pub fn from_name(name: &str) -> Option<ReturnFlags>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: ReturnFlags) -> bool
pub const fn intersects(&self, other: ReturnFlags) -> bool
Whether any set bits in other are also set in self.
Sourcepub const fn contains(&self, other: ReturnFlags) -> bool
pub const fn contains(&self, other: ReturnFlags) -> bool
Whether all set bits in other are also set in self.
Sourcepub fn insert(&mut self, other: ReturnFlags)
pub fn insert(&mut self, other: ReturnFlags)
The bitwise or (|) of the bits in self and other.
Sourcepub fn remove(&mut self, other: ReturnFlags)
pub fn remove(&mut self, other: ReturnFlags)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
Sourcepub fn toggle(&mut self, other: ReturnFlags)
pub fn toggle(&mut self, other: ReturnFlags)
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub fn set(&mut self, other: ReturnFlags, value: bool)
pub fn set(&mut self, other: ReturnFlags, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub const fn intersection(self, other: ReturnFlags) -> ReturnFlags
pub const fn intersection(self, other: ReturnFlags) -> ReturnFlags
The bitwise and (&) of the bits in self and other.
Sourcepub const fn union(self, other: ReturnFlags) -> ReturnFlags
pub const fn union(self, other: ReturnFlags) -> ReturnFlags
The bitwise or (|) of the bits in self and other.
Sourcepub const fn difference(self, other: ReturnFlags) -> ReturnFlags
pub const fn difference(self, other: ReturnFlags) -> ReturnFlags
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Sourcepub const fn symmetric_difference(self, other: ReturnFlags) -> ReturnFlags
pub const fn symmetric_difference(self, other: ReturnFlags) -> ReturnFlags
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub const fn complement(self) -> ReturnFlags
pub const fn complement(self) -> ReturnFlags
The bitwise negation (!) of the bits in self, truncating the result.
Source§impl ReturnFlags
impl ReturnFlags
Sourcepub const fn iter(&self) -> Iter<ReturnFlags> ⓘ
pub const fn iter(&self) -> Iter<ReturnFlags> ⓘ
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<ReturnFlags> ⓘ
pub const fn iter_names(&self) -> IterNames<ReturnFlags> ⓘ
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
Source§impl Binary for ReturnFlags
impl Binary for ReturnFlags
Source§impl BitAnd for ReturnFlags
impl BitAnd for ReturnFlags
Source§fn bitand(self, other: ReturnFlags) -> ReturnFlags
fn bitand(self, other: ReturnFlags) -> ReturnFlags
The bitwise and (&) of the bits in self and other.
Source§type Output = ReturnFlags
type Output = ReturnFlags
& operator.Source§impl BitAndAssign for ReturnFlags
impl BitAndAssign for ReturnFlags
Source§fn bitand_assign(&mut self, other: ReturnFlags)
fn bitand_assign(&mut self, other: ReturnFlags)
The bitwise and (&) of the bits in self and other.
Source§impl BitOr for ReturnFlags
impl BitOr for ReturnFlags
Source§fn bitor(self, other: ReturnFlags) -> ReturnFlags
fn bitor(self, other: ReturnFlags) -> ReturnFlags
The bitwise or (|) of the bits in self and other.
Source§type Output = ReturnFlags
type Output = ReturnFlags
| operator.Source§impl BitOrAssign for ReturnFlags
impl BitOrAssign for ReturnFlags
Source§fn bitor_assign(&mut self, other: ReturnFlags)
fn bitor_assign(&mut self, other: ReturnFlags)
The bitwise or (|) of the bits in self and other.
Source§impl BitXor for ReturnFlags
impl BitXor for ReturnFlags
Source§fn bitxor(self, other: ReturnFlags) -> ReturnFlags
fn bitxor(self, other: ReturnFlags) -> ReturnFlags
The bitwise exclusive-or (^) of the bits in self and other.
Source§type Output = ReturnFlags
type Output = ReturnFlags
^ operator.Source§impl BitXorAssign for ReturnFlags
impl BitXorAssign for ReturnFlags
Source§fn bitxor_assign(&mut self, other: ReturnFlags)
fn bitxor_assign(&mut self, other: ReturnFlags)
The bitwise exclusive-or (^) of the bits in self and other.
Source§impl Clone for ReturnFlags
impl Clone for ReturnFlags
Source§fn clone(&self) -> ReturnFlags
fn clone(&self) -> ReturnFlags
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ReturnFlags
Source§impl Debug for ReturnFlags
impl Debug for ReturnFlags
impl Eq for ReturnFlags
Source§impl Extend<ReturnFlags> for ReturnFlags
impl Extend<ReturnFlags> for ReturnFlags
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = ReturnFlags>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = ReturnFlags>,
The bitwise or (|) of the bits in each flags value.
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl Flags for ReturnFlags
impl Flags for ReturnFlags
Source§const FLAGS: &'static [Flag<ReturnFlags>]
const FLAGS: &'static [Flag<ReturnFlags>]
Source§fn from_bits_retain(bits: u32) -> ReturnFlags
fn from_bits_retain(bits: u32) -> ReturnFlags
Source§fn all_named() -> ReturnFlags
fn all_named() -> ReturnFlags
Source§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
Source§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self> ⓘ
fn iter_names(&self) -> IterNames<Self> ⓘ
Source§fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
Self::FLAGS.Source§fn iter_equal_names(&self) -> IterEqualNames<Self> ⓘ
fn iter_equal_names(&self) -> IterEqualNames<Self> ⓘ
Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in self and other.Source§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in self and other.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in self and other.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
Source§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in self and other.Source§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in self, truncating the result.Source§impl FromIterator<ReturnFlags> for ReturnFlags
impl FromIterator<ReturnFlags> for ReturnFlags
Source§fn from_iter<T>(iterator: T) -> ReturnFlagswhere
T: IntoIterator<Item = ReturnFlags>,
fn from_iter<T>(iterator: T) -> ReturnFlagswhere
T: IntoIterator<Item = ReturnFlags>,
The bitwise or (|) of the bits in each flags value.
Source§impl Hash for ReturnFlags
impl Hash for ReturnFlags
Source§impl IntoIterator for ReturnFlags
impl IntoIterator for ReturnFlags
Source§type Item = ReturnFlags
type Item = ReturnFlags
Source§type IntoIter = Iter<ReturnFlags>
type IntoIter = Iter<ReturnFlags>
Source§fn into_iter(self) -> <ReturnFlags as IntoIterator>::IntoIter
fn into_iter(self) -> <ReturnFlags as IntoIterator>::IntoIter
Source§impl LowerHex for ReturnFlags
impl LowerHex for ReturnFlags
Source§impl Not for ReturnFlags
impl Not for ReturnFlags
Source§fn not(self) -> ReturnFlags
fn not(self) -> ReturnFlags
The bitwise negation (!) of the bits in self, truncating the result.
Source§type Output = ReturnFlags
type Output = ReturnFlags
! operator.Source§impl Octal for ReturnFlags
impl Octal for ReturnFlags
Source§impl PartialEq for ReturnFlags
impl PartialEq for ReturnFlags
impl StructuralPartialEq for ReturnFlags
Source§impl Sub for ReturnFlags
impl Sub for ReturnFlags
Source§fn sub(self, other: ReturnFlags) -> ReturnFlags
fn sub(self, other: ReturnFlags) -> ReturnFlags
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Source§type Output = ReturnFlags
type Output = ReturnFlags
- operator.Source§impl SubAssign for ReturnFlags
impl SubAssign for ReturnFlags
Source§fn sub_assign(&mut self, other: ReturnFlags)
fn sub_assign(&mut self, other: ReturnFlags)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.