Struct rustix_uring::types::IoringSetupFlags
source · pub struct IoringSetupFlags { /* private fields */ }
Expand description
IORING_SETUP_*
flags for use with io_uring_params
.
Implementations§
source§impl IoringSetupFlags
impl IoringSetupFlags
sourcepub const ATTACH_WQ: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_ATTACH_WQ,}
pub const ATTACH_WQ: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_ATTACH_WQ,}
IORING_SETUP_ATTACH_WQ
sourcepub const CLAMP: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_CLAMP,}
pub const CLAMP: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_CLAMP,}
IORING_SETUP_CLAMP
sourcepub const CQSIZE: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_CQSIZE,}
pub const CQSIZE: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_CQSIZE,}
IORING_SETUP_CQSIZE
sourcepub const IOPOLL: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_IOPOLL,}
pub const IOPOLL: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_IOPOLL,}
IORING_SETUP_IOPOLL
sourcepub const R_DISABLED: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_R_DISABLED,}
pub const R_DISABLED: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_R_DISABLED,}
IORING_SETUP_R_DISABLED
sourcepub const SQPOLL: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_SQPOLL,}
pub const SQPOLL: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_SQPOLL,}
IORING_SETUP_SQPOLL
sourcepub const SQ_AFF: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_SQ_AFF,}
pub const SQ_AFF: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_SQ_AFF,}
IORING_SETUP_SQ_AFF
sourcepub const SQE128: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_SQE128,}
pub const SQE128: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_SQE128,}
IORING_SETUP_SQE128
sourcepub const CQE32: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_CQE32,}
pub const CQE32: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_CQE32,}
IORING_SETUP_CQE32
sourcepub const SUBMIT_ALL: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_SUBMIT_ALL,}
pub const SUBMIT_ALL: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_SUBMIT_ALL,}
IORING_SETUP_SUBMIT_ALL
sourcepub const COOP_TASKRUN: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_COOP_TASKRUN,}
pub const COOP_TASKRUN: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_COOP_TASKRUN,}
IORING_SETUP_COOP_TRASKRUN
sourcepub const TASKRUN_FLAG: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_TASKRUN_FLAG,}
pub const TASKRUN_FLAG: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_TASKRUN_FLAG,}
IORING_SETUP_TASKRUN_FLAG
sourcepub const SINGLE_ISSUER: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_SINGLE_ISSUER,}
pub const SINGLE_ISSUER: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_SINGLE_ISSUER,}
IORING_SETUP_SINGLE_ISSUER
sourcepub const DEFER_TASKRUN: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_DEFER_TASKRUN,}
pub const DEFER_TASKRUN: IoringSetupFlags = Self{ bits: sys::IORING_SETUP_DEFER_TASKRUN,}
IORING_SETUP_DEFER_TASKRUN
sourcepub const fn empty() -> IoringSetupFlags
pub const fn empty() -> IoringSetupFlags
Returns an empty set of flags.
sourcepub const fn all() -> IoringSetupFlags
pub const fn all() -> IoringSetupFlags
Returns the set containing all flags.
sourcepub const fn from_bits(bits: u32) -> Option<IoringSetupFlags>
pub const fn from_bits(bits: u32) -> Option<IoringSetupFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
sourcepub const fn from_bits_truncate(bits: u32) -> IoringSetupFlags
pub const fn from_bits_truncate(bits: u32) -> IoringSetupFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> IoringSetupFlags
pub const unsafe fn from_bits_unchecked(bits: u32) -> IoringSetupFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Safety
The caller of the bitflags!
macro can chose to allow or
disallow extra bits for their bitflags type.
The caller of from_bits_unchecked()
has to ensure that
all bits correspond to a defined flag or that extra bits
are valid for this bitflags type.
sourcepub const fn intersects(&self, other: IoringSetupFlags) -> bool
pub const fn intersects(&self, other: IoringSetupFlags) -> bool
Returns true
if there are flags common to both self
and other
.
sourcepub const fn contains(&self, other: IoringSetupFlags) -> bool
pub const fn contains(&self, other: IoringSetupFlags) -> bool
Returns true
if all of the flags in other
are contained within self
.
sourcepub fn insert(&mut self, other: IoringSetupFlags)
pub fn insert(&mut self, other: IoringSetupFlags)
Inserts the specified flags in-place.
sourcepub fn remove(&mut self, other: IoringSetupFlags)
pub fn remove(&mut self, other: IoringSetupFlags)
Removes the specified flags in-place.
sourcepub fn toggle(&mut self, other: IoringSetupFlags)
pub fn toggle(&mut self, other: IoringSetupFlags)
Toggles the specified flags in-place.
sourcepub fn set(&mut self, other: IoringSetupFlags, value: bool)
pub fn set(&mut self, other: IoringSetupFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
sourcepub const fn intersection(self, other: IoringSetupFlags) -> IoringSetupFlags
pub const fn intersection(self, other: IoringSetupFlags) -> IoringSetupFlags
Returns the intersection between the flags in self
and
other
.
Specifically, the returned set contains only the flags which are
present in both self
and other
.
This is equivalent to using the &
operator (e.g.
ops::BitAnd
), as in flags & other
.
sourcepub const fn union(self, other: IoringSetupFlags) -> IoringSetupFlags
pub const fn union(self, other: IoringSetupFlags) -> IoringSetupFlags
Returns the union of between the flags in self
and other
.
Specifically, the returned set contains all flags which are
present in either self
or other
, including any which are
present in both (see Self::symmetric_difference
if that
is undesirable).
This is equivalent to using the |
operator (e.g.
ops::BitOr
), as in flags | other
.
sourcepub const fn difference(self, other: IoringSetupFlags) -> IoringSetupFlags
pub const fn difference(self, other: IoringSetupFlags) -> IoringSetupFlags
Returns the difference between the flags in self
and other
.
Specifically, the returned set contains all flags present in
self
, except for the ones present in other
.
It is also conceptually equivalent to the “bit-clear” operation:
flags & !other
(and this syntax is also supported).
This is equivalent to using the -
operator (e.g.
ops::Sub
), as in flags - other
.
sourcepub const fn symmetric_difference(
self,
other: IoringSetupFlags
) -> IoringSetupFlags
pub const fn symmetric_difference( self, other: IoringSetupFlags ) -> IoringSetupFlags
Returns the symmetric difference between the flags
in self
and other
.
Specifically, the returned set contains the flags present which
are present in self
or other
, but that are not present in
both. Equivalently, it contains the flags present in exactly
one of the sets self
and other
.
This is equivalent to using the ^
operator (e.g.
ops::BitXor
), as in flags ^ other
.
sourcepub const fn complement(self) -> IoringSetupFlags
pub const fn complement(self) -> IoringSetupFlags
Returns the complement of this set of flags.
Specifically, the returned set contains all the flags which are
not set in self
, but which are allowed for this type.
Alternatively, it can be thought of as the set difference
between Self::all()
and self
(e.g. Self::all() - self
)
This is equivalent to using the !
operator (e.g.
ops::Not
), as in !flags
.
Trait Implementations§
source§impl Binary for IoringSetupFlags
impl Binary for IoringSetupFlags
source§impl BitAnd<IoringSetupFlags> for IoringSetupFlags
impl BitAnd<IoringSetupFlags> for IoringSetupFlags
source§fn bitand(self, other: IoringSetupFlags) -> IoringSetupFlags
fn bitand(self, other: IoringSetupFlags) -> IoringSetupFlags
Returns the intersection between the two sets of flags.
§type Output = IoringSetupFlags
type Output = IoringSetupFlags
&
operator.source§impl BitAndAssign<IoringSetupFlags> for IoringSetupFlags
impl BitAndAssign<IoringSetupFlags> for IoringSetupFlags
source§fn bitand_assign(&mut self, other: IoringSetupFlags)
fn bitand_assign(&mut self, other: IoringSetupFlags)
Disables all flags disabled in the set.
source§impl BitOr<IoringSetupFlags> for IoringSetupFlags
impl BitOr<IoringSetupFlags> for IoringSetupFlags
source§fn bitor(self, other: IoringSetupFlags) -> IoringSetupFlags
fn bitor(self, other: IoringSetupFlags) -> IoringSetupFlags
Returns the union of the two sets of flags.
§type Output = IoringSetupFlags
type Output = IoringSetupFlags
|
operator.source§impl BitOrAssign<IoringSetupFlags> for IoringSetupFlags
impl BitOrAssign<IoringSetupFlags> for IoringSetupFlags
source§fn bitor_assign(&mut self, other: IoringSetupFlags)
fn bitor_assign(&mut self, other: IoringSetupFlags)
Adds the set of flags.
source§impl BitXor<IoringSetupFlags> for IoringSetupFlags
impl BitXor<IoringSetupFlags> for IoringSetupFlags
source§fn bitxor(self, other: IoringSetupFlags) -> IoringSetupFlags
fn bitxor(self, other: IoringSetupFlags) -> IoringSetupFlags
Returns the left flags, but with all the right flags toggled.
§type Output = IoringSetupFlags
type Output = IoringSetupFlags
^
operator.source§impl BitXorAssign<IoringSetupFlags> for IoringSetupFlags
impl BitXorAssign<IoringSetupFlags> for IoringSetupFlags
source§fn bitxor_assign(&mut self, other: IoringSetupFlags)
fn bitxor_assign(&mut self, other: IoringSetupFlags)
Toggles the set of flags.
source§impl Clone for IoringSetupFlags
impl Clone for IoringSetupFlags
source§fn clone(&self) -> IoringSetupFlags
fn clone(&self) -> IoringSetupFlags
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for IoringSetupFlags
impl Debug for IoringSetupFlags
source§impl Default for IoringSetupFlags
impl Default for IoringSetupFlags
source§fn default() -> IoringSetupFlags
fn default() -> IoringSetupFlags
source§impl Extend<IoringSetupFlags> for IoringSetupFlags
impl Extend<IoringSetupFlags> for IoringSetupFlags
source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = IoringSetupFlags>,
fn extend<T>(&mut self, iterator: T)where T: IntoIterator<Item = IoringSetupFlags>,
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 FromIterator<IoringSetupFlags> for IoringSetupFlags
impl FromIterator<IoringSetupFlags> for IoringSetupFlags
source§fn from_iter<T>(iterator: T) -> IoringSetupFlagswhere
T: IntoIterator<Item = IoringSetupFlags>,
fn from_iter<T>(iterator: T) -> IoringSetupFlagswhere T: IntoIterator<Item = IoringSetupFlags>,
source§impl Hash for IoringSetupFlags
impl Hash for IoringSetupFlags
source§impl LowerHex for IoringSetupFlags
impl LowerHex for IoringSetupFlags
source§impl Not for IoringSetupFlags
impl Not for IoringSetupFlags
source§fn not(self) -> IoringSetupFlags
fn not(self) -> IoringSetupFlags
Returns the complement of this set of flags.
§type Output = IoringSetupFlags
type Output = IoringSetupFlags
!
operator.source§impl Octal for IoringSetupFlags
impl Octal for IoringSetupFlags
source§impl Ord for IoringSetupFlags
impl Ord for IoringSetupFlags
source§fn cmp(&self, other: &IoringSetupFlags) -> Ordering
fn cmp(&self, other: &IoringSetupFlags) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<IoringSetupFlags> for IoringSetupFlags
impl PartialEq<IoringSetupFlags> for IoringSetupFlags
source§fn eq(&self, other: &IoringSetupFlags) -> bool
fn eq(&self, other: &IoringSetupFlags) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<IoringSetupFlags> for IoringSetupFlags
impl PartialOrd<IoringSetupFlags> for IoringSetupFlags
source§fn partial_cmp(&self, other: &IoringSetupFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &IoringSetupFlags) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Sub<IoringSetupFlags> for IoringSetupFlags
impl Sub<IoringSetupFlags> for IoringSetupFlags
source§fn sub(self, other: IoringSetupFlags) -> IoringSetupFlags
fn sub(self, other: IoringSetupFlags) -> IoringSetupFlags
Returns the set difference of the two sets of flags.
§type Output = IoringSetupFlags
type Output = IoringSetupFlags
-
operator.source§impl SubAssign<IoringSetupFlags> for IoringSetupFlags
impl SubAssign<IoringSetupFlags> for IoringSetupFlags
source§fn sub_assign(&mut self, other: IoringSetupFlags)
fn sub_assign(&mut self, other: IoringSetupFlags)
Disables all flags enabled in the set.