pub struct CompletionFlags(/* private fields */);Expand description
Flags de complétion IORING_CQE_F_* (axe E, 5 flags en 6.12).
Exposés de façon typée par les méthodes de Completion
(has_more, is_notif, buffer_id, socket_has_pending_data).
Implementations§
Source§impl CompletionFlags
impl CompletionFlags
Sourcepub const BUFFER: CompletionFlags
pub const BUFFER: CompletionFlags
IORING_CQE_F_BUFFER : un buffer fourni a été consommé (id dans les bits hauts).
Sourcepub const MORE: CompletionFlags
pub const MORE: CompletionFlags
IORING_CQE_F_MORE : d’autres complétions suivront (multishot, Temps 3d).
Sourcepub const SOCK_NONEMPTY: CompletionFlags
pub const SOCK_NONEMPTY: CompletionFlags
IORING_CQE_F_SOCK_NONEMPTY : données restantes lisibles après un recv.
Sourcepub const NOTIF: CompletionFlags
pub const NOTIF: CompletionFlags
IORING_CQE_F_NOTIF : complétion de notification zero-copy (Temps 2b).
Sourcepub const BUF_MORE: CompletionFlags
pub const BUF_MORE: CompletionFlags
IORING_CQE_F_BUF_MORE : consommation incrémentale d’un buffer (Temps 3b).
Source§impl CompletionFlags
impl CompletionFlags
Sourcepub const fn empty() -> CompletionFlags
pub const fn empty() -> CompletionFlags
Get a flags value with all bits unset.
Sourcepub const fn all() -> CompletionFlags
pub const fn all() -> CompletionFlags
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<CompletionFlags>
pub const fn from_bits(bits: u32) -> Option<CompletionFlags>
Convert from a bits value.
This method will return None if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u32) -> CompletionFlags
pub const fn from_bits_truncate(bits: u32) -> CompletionFlags
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u32) -> CompletionFlags
pub const fn from_bits_retain(bits: u32) -> CompletionFlags
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<CompletionFlags>
pub fn from_name(name: &str) -> Option<CompletionFlags>
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: CompletionFlags) -> bool
pub const fn intersects(&self, other: CompletionFlags) -> bool
Whether any set bits in other are also set in self.
Sourcepub const fn contains(&self, other: CompletionFlags) -> bool
pub const fn contains(&self, other: CompletionFlags) -> bool
Whether all set bits in other are also set in self.
Sourcepub fn insert(&mut self, other: CompletionFlags)
pub fn insert(&mut self, other: CompletionFlags)
The bitwise or (|) of the bits in self and other.
Sourcepub fn remove(&mut self, other: CompletionFlags)
pub fn remove(&mut self, other: CompletionFlags)
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: CompletionFlags)
pub fn toggle(&mut self, other: CompletionFlags)
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub fn set(&mut self, other: CompletionFlags, value: bool)
pub fn set(&mut self, other: CompletionFlags, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub const fn intersection(self, other: CompletionFlags) -> CompletionFlags
pub const fn intersection(self, other: CompletionFlags) -> CompletionFlags
The bitwise and (&) of the bits in self and other.
Sourcepub const fn union(self, other: CompletionFlags) -> CompletionFlags
pub const fn union(self, other: CompletionFlags) -> CompletionFlags
The bitwise or (|) of the bits in self and other.
Sourcepub const fn difference(self, other: CompletionFlags) -> CompletionFlags
pub const fn difference(self, other: CompletionFlags) -> CompletionFlags
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: CompletionFlags,
) -> CompletionFlags
pub const fn symmetric_difference( self, other: CompletionFlags, ) -> CompletionFlags
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub const fn complement(self) -> CompletionFlags
pub const fn complement(self) -> CompletionFlags
The bitwise negation (!) of the bits in self, truncating the result.
Source§impl CompletionFlags
impl CompletionFlags
Sourcepub const fn iter(&self) -> Iter<CompletionFlags>
pub const fn iter(&self) -> Iter<CompletionFlags>
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<CompletionFlags>
pub const fn iter_names(&self) -> IterNames<CompletionFlags>
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 CompletionFlags
impl Binary for CompletionFlags
Source§impl BitAnd for CompletionFlags
impl BitAnd for CompletionFlags
Source§fn bitand(self, other: CompletionFlags) -> CompletionFlags
fn bitand(self, other: CompletionFlags) -> CompletionFlags
The bitwise and (&) of the bits in self and other.
Source§type Output = CompletionFlags
type Output = CompletionFlags
& operator.Source§impl BitAndAssign for CompletionFlags
impl BitAndAssign for CompletionFlags
Source§fn bitand_assign(&mut self, other: CompletionFlags)
fn bitand_assign(&mut self, other: CompletionFlags)
The bitwise and (&) of the bits in self and other.
Source§impl BitOr for CompletionFlags
impl BitOr for CompletionFlags
Source§fn bitor(self, other: CompletionFlags) -> CompletionFlags
fn bitor(self, other: CompletionFlags) -> CompletionFlags
The bitwise or (|) of the bits in self and other.
Source§type Output = CompletionFlags
type Output = CompletionFlags
| operator.Source§impl BitOrAssign for CompletionFlags
impl BitOrAssign for CompletionFlags
Source§fn bitor_assign(&mut self, other: CompletionFlags)
fn bitor_assign(&mut self, other: CompletionFlags)
The bitwise or (|) of the bits in self and other.
Source§impl BitXor for CompletionFlags
impl BitXor for CompletionFlags
Source§fn bitxor(self, other: CompletionFlags) -> CompletionFlags
fn bitxor(self, other: CompletionFlags) -> CompletionFlags
The bitwise exclusive-or (^) of the bits in self and other.
Source§type Output = CompletionFlags
type Output = CompletionFlags
^ operator.Source§impl BitXorAssign for CompletionFlags
impl BitXorAssign for CompletionFlags
Source§fn bitxor_assign(&mut self, other: CompletionFlags)
fn bitxor_assign(&mut self, other: CompletionFlags)
The bitwise exclusive-or (^) of the bits in self and other.
Source§impl Clone for CompletionFlags
impl Clone for CompletionFlags
Source§fn clone(&self) -> CompletionFlags
fn clone(&self) -> CompletionFlags
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 CompletionFlags
Source§impl Debug for CompletionFlags
impl Debug for CompletionFlags
impl Eq for CompletionFlags
Source§impl Extend<CompletionFlags> for CompletionFlags
impl Extend<CompletionFlags> for CompletionFlags
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = CompletionFlags>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = CompletionFlags>,
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 CompletionFlags
impl Flags for CompletionFlags
Source§const FLAGS: &'static [Flag<CompletionFlags>]
const FLAGS: &'static [Flag<CompletionFlags>]
Source§fn from_bits_retain(bits: u32) -> CompletionFlags
fn from_bits_retain(bits: u32) -> CompletionFlags
§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
§fn iter_defined_names() -> IterDefinedNames<Self>
fn iter_defined_names() -> IterDefinedNames<Self>
Self::FLAGS].§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.§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.§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.§fn set(&mut self, other: Self, value: bool)where
Self: Sized,
fn set(&mut self, other: Self, value: bool)where
Self: Sized,
Flags::insert] when value is true or [Flags::remove] when value is false.§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in self and other.§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in self and other.§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in self, truncating the result.Source§impl FromIterator<CompletionFlags> for CompletionFlags
impl FromIterator<CompletionFlags> for CompletionFlags
Source§fn from_iter<T>(iterator: T) -> CompletionFlagswhere
T: IntoIterator<Item = CompletionFlags>,
fn from_iter<T>(iterator: T) -> CompletionFlagswhere
T: IntoIterator<Item = CompletionFlags>,
The bitwise or (|) of the bits in each flags value.
Source§impl IntoIterator for CompletionFlags
impl IntoIterator for CompletionFlags
Source§type Item = CompletionFlags
type Item = CompletionFlags
Source§type IntoIter = Iter<CompletionFlags>
type IntoIter = Iter<CompletionFlags>
Source§fn into_iter(self) -> <CompletionFlags as IntoIterator>::IntoIter
fn into_iter(self) -> <CompletionFlags as IntoIterator>::IntoIter
Source§impl LowerHex for CompletionFlags
impl LowerHex for CompletionFlags
Source§impl Not for CompletionFlags
impl Not for CompletionFlags
Source§fn not(self) -> CompletionFlags
fn not(self) -> CompletionFlags
The bitwise negation (!) of the bits in self, truncating the result.
Source§type Output = CompletionFlags
type Output = CompletionFlags
! operator.Source§impl Octal for CompletionFlags
impl Octal for CompletionFlags
Source§impl PartialEq for CompletionFlags
impl PartialEq for CompletionFlags
impl StructuralPartialEq for CompletionFlags
Source§impl Sub for CompletionFlags
impl Sub for CompletionFlags
Source§fn sub(self, other: CompletionFlags) -> CompletionFlags
fn sub(self, other: CompletionFlags) -> CompletionFlags
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 = CompletionFlags
type Output = CompletionFlags
- operator.Source§impl SubAssign for CompletionFlags
impl SubAssign for CompletionFlags
Source§fn sub_assign(&mut self, other: CompletionFlags)
fn sub_assign(&mut self, other: CompletionFlags)
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.