#[repr(C)]pub struct ActionFeature(/* private fields */);
Expand description
Object action feature flags
Implementations§
Source§impl ActionFeature
impl ActionFeature
Sourcepub const Create: ActionFeature
pub const Create: ActionFeature
create
Sourcepub const Delete: ActionFeature
pub const Delete: ActionFeature
delete
Sourcepub const CheckSum: ActionFeature
pub const CheckSum: ActionFeature
checksum
Sourcepub const Execute: ActionFeature
pub const Execute: ActionFeature
execute
Sourcepub const Read: ActionFeature
pub const Read: ActionFeature
read
Sourcepub const Write: ActionFeature
pub const Write: ActionFeature
write
Sourcepub const Append: ActionFeature
pub const Append: ActionFeature
append
Sourcepub const Truncate: ActionFeature
pub const Truncate: ActionFeature
truncate
Sourcepub const Patch: ActionFeature
pub const Patch: ActionFeature
patch
Sourcepub const Abort: ActionFeature
pub const Abort: ActionFeature
abort
Source§impl ActionFeature
impl ActionFeature
Sourcepub const fn empty() -> ActionFeature
pub const fn empty() -> ActionFeature
Get a flags value with all bits unset.
Sourcepub const fn all() -> ActionFeature
pub const fn all() -> ActionFeature
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<ActionFeature>
pub const fn from_bits(bits: u32) -> Option<ActionFeature>
Convert from a bits value.
This method will return None
if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u32) -> ActionFeature
pub const fn from_bits_truncate(bits: u32) -> ActionFeature
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u32) -> ActionFeature
pub const fn from_bits_retain(bits: u32) -> ActionFeature
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<ActionFeature>
pub fn from_name(name: &str) -> Option<ActionFeature>
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: ActionFeature) -> bool
pub const fn intersects(&self, other: ActionFeature) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
Sourcepub const fn contains(&self, other: ActionFeature) -> bool
pub const fn contains(&self, other: ActionFeature) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Sourcepub fn insert(&mut self, other: ActionFeature)
pub fn insert(&mut self, other: ActionFeature)
The bitwise or (|
) of the bits in two flags values.
Sourcepub fn remove(&mut self, other: ActionFeature)
pub fn remove(&mut self, other: ActionFeature)
The intersection of a source flags value with the complement of a target flags value (&!
).
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: ActionFeature)
pub fn toggle(&mut self, other: ActionFeature)
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub fn set(&mut self, other: ActionFeature, value: bool)
pub fn set(&mut self, other: ActionFeature, value: bool)
Call insert
when value
is true
or remove
when value
is false
.
Sourcepub const fn intersection(self, other: ActionFeature) -> ActionFeature
pub const fn intersection(self, other: ActionFeature) -> ActionFeature
The bitwise and (&
) of the bits in two flags values.
Sourcepub const fn union(self, other: ActionFeature) -> ActionFeature
pub const fn union(self, other: ActionFeature) -> ActionFeature
The bitwise or (|
) of the bits in two flags values.
Sourcepub const fn difference(self, other: ActionFeature) -> ActionFeature
pub const fn difference(self, other: ActionFeature) -> ActionFeature
The intersection of a source flags value with the complement of a target flags value (&!
).
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: ActionFeature) -> ActionFeature
pub const fn symmetric_difference(self, other: ActionFeature) -> ActionFeature
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub const fn complement(self) -> ActionFeature
pub const fn complement(self) -> ActionFeature
The bitwise negation (!
) of the bits in a flags value, truncating the result.
Source§impl ActionFeature
impl ActionFeature
Sourcepub const fn iter(&self) -> Iter<ActionFeature>
pub const fn iter(&self) -> Iter<ActionFeature>
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<ActionFeature>
pub const fn iter_names(&self) -> IterNames<ActionFeature>
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 AsRef<ActionFeature> for OtsClient
impl AsRef<ActionFeature> for OtsClient
Source§fn as_ref(&self) -> &ActionFeature
fn as_ref(&self) -> &ActionFeature
Source§impl Binary for ActionFeature
impl Binary for ActionFeature
Source§impl BitAnd for ActionFeature
impl BitAnd for ActionFeature
Source§fn bitand(self, other: ActionFeature) -> ActionFeature
fn bitand(self, other: ActionFeature) -> ActionFeature
The bitwise and (&
) of the bits in two flags values.
Source§type Output = ActionFeature
type Output = ActionFeature
&
operator.Source§impl BitAndAssign for ActionFeature
impl BitAndAssign for ActionFeature
Source§fn bitand_assign(&mut self, other: ActionFeature)
fn bitand_assign(&mut self, other: ActionFeature)
The bitwise and (&
) of the bits in two flags values.
Source§impl BitOr for ActionFeature
impl BitOr for ActionFeature
Source§fn bitor(self, other: ActionFeature) -> ActionFeature
fn bitor(self, other: ActionFeature) -> ActionFeature
The bitwise or (|
) of the bits in two flags values.
Source§type Output = ActionFeature
type Output = ActionFeature
|
operator.Source§impl BitOrAssign for ActionFeature
impl BitOrAssign for ActionFeature
Source§fn bitor_assign(&mut self, other: ActionFeature)
fn bitor_assign(&mut self, other: ActionFeature)
The bitwise or (|
) of the bits in two flags values.
Source§impl BitXor for ActionFeature
impl BitXor for ActionFeature
Source§fn bitxor(self, other: ActionFeature) -> ActionFeature
fn bitxor(self, other: ActionFeature) -> ActionFeature
The bitwise exclusive-or (^
) of the bits in two flags values.
Source§type Output = ActionFeature
type Output = ActionFeature
^
operator.Source§impl BitXorAssign for ActionFeature
impl BitXorAssign for ActionFeature
Source§fn bitxor_assign(&mut self, other: ActionFeature)
fn bitxor_assign(&mut self, other: ActionFeature)
The bitwise exclusive-or (^
) of the bits in two flags values.
Source§impl Clone for ActionFeature
impl Clone for ActionFeature
Source§fn clone(&self) -> ActionFeature
fn clone(&self) -> ActionFeature
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ActionFeature
impl Debug for ActionFeature
Source§impl Default for ActionFeature
impl Default for ActionFeature
Source§fn default() -> ActionFeature
fn default() -> ActionFeature
Source§impl Display for ActionFeature
impl Display for ActionFeature
Source§impl Extend<ActionFeature> for ActionFeature
impl Extend<ActionFeature> for ActionFeature
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = ActionFeature>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = ActionFeature>,
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 ActionFeature
impl Flags for ActionFeature
Source§const FLAGS: &'static [Flag<ActionFeature>]
const FLAGS: &'static [Flag<ActionFeature>]
Source§fn from_bits_retain(bits: u32) -> ActionFeature
fn from_bits_retain(bits: u32) -> ActionFeature
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 intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|
) of the bits in two flags values.Source§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!
). Read moreSource§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^
) of the bits in two flags values.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&
) of the bits in two flags values.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!
). Read moreSource§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^
) of the bits in two flags values.Source§fn complement(self) -> Self
fn complement(self) -> Self
!
) of the bits in a flags value, truncating the result.Source§impl FromIterator<ActionFeature> for ActionFeature
impl FromIterator<ActionFeature> for ActionFeature
Source§fn from_iter<T>(iterator: T) -> ActionFeaturewhere
T: IntoIterator<Item = ActionFeature>,
fn from_iter<T>(iterator: T) -> ActionFeaturewhere
T: IntoIterator<Item = ActionFeature>,
The bitwise or (|
) of the bits in each flags value.
Source§impl Hash for ActionFeature
impl Hash for ActionFeature
Source§impl IntoIterator for ActionFeature
impl IntoIterator for ActionFeature
Source§type Item = ActionFeature
type Item = ActionFeature
Source§type IntoIter = Iter<ActionFeature>
type IntoIter = Iter<ActionFeature>
Source§fn into_iter(self) -> <ActionFeature as IntoIterator>::IntoIter
fn into_iter(self) -> <ActionFeature as IntoIterator>::IntoIter
Source§impl LowerHex for ActionFeature
impl LowerHex for ActionFeature
Source§impl Not for ActionFeature
impl Not for ActionFeature
Source§fn not(self) -> ActionFeature
fn not(self) -> ActionFeature
The bitwise negation (!
) of the bits in a flags value, truncating the result.
Source§type Output = ActionFeature
type Output = ActionFeature
!
operator.Source§impl Octal for ActionFeature
impl Octal for ActionFeature
Source§impl Ord for ActionFeature
impl Ord for ActionFeature
Source§fn cmp(&self, other: &ActionFeature) -> Ordering
fn cmp(&self, other: &ActionFeature) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ActionFeature
impl PartialEq for ActionFeature
Source§impl PartialOrd for ActionFeature
impl PartialOrd for ActionFeature
Source§impl Sub for ActionFeature
impl Sub for ActionFeature
Source§fn sub(self, other: ActionFeature) -> ActionFeature
fn sub(self, other: ActionFeature) -> ActionFeature
The intersection of a source flags value with the complement of a target flags value (&!
).
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 = ActionFeature
type Output = ActionFeature
-
operator.Source§impl SubAssign for ActionFeature
impl SubAssign for ActionFeature
Source§fn sub_assign(&mut self, other: ActionFeature)
fn sub_assign(&mut self, other: ActionFeature)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.