pub struct EsdtLocalRoleFlags(/* private fields */);
Implementations§
Source§impl EsdtLocalRoleFlags
impl EsdtLocalRoleFlags
pub const NONE: EsdtLocalRoleFlags
pub const MINT: EsdtLocalRoleFlags
pub const BURN: EsdtLocalRoleFlags
pub const NFT_CREATE: EsdtLocalRoleFlags
pub const NFT_ADD_QUANTITY: EsdtLocalRoleFlags
pub const NFT_BURN: EsdtLocalRoleFlags
pub const NFT_ADD_URI: EsdtLocalRoleFlags
pub const NFT_UPDATE_ATTRIBUTES: EsdtLocalRoleFlags
pub const TRANSFER: EsdtLocalRoleFlags
pub const SET_NEW_URI: EsdtLocalRoleFlags
pub const MODIFY_ROYALTIES: EsdtLocalRoleFlags
pub const MODIFY_CREATOR: EsdtLocalRoleFlags
pub const NFT_RECREATE: EsdtLocalRoleFlags
pub const NFT_UPDATE: EsdtLocalRoleFlags
Source§impl EsdtLocalRoleFlags
impl EsdtLocalRoleFlags
Sourcepub const fn empty() -> EsdtLocalRoleFlags
pub const fn empty() -> EsdtLocalRoleFlags
Get a flags value with all bits unset.
Sourcepub const fn all() -> EsdtLocalRoleFlags
pub const fn all() -> EsdtLocalRoleFlags
Get a flags value with all known bits set.
Sourcepub const fn bits(&self) -> u64
pub const fn bits(&self) -> u64
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: u64) -> Option<EsdtLocalRoleFlags>
pub const fn from_bits(bits: u64) -> Option<EsdtLocalRoleFlags>
Convert from a bits value.
This method will return None
if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u64) -> EsdtLocalRoleFlags
pub const fn from_bits_truncate(bits: u64) -> EsdtLocalRoleFlags
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u64) -> EsdtLocalRoleFlags
pub const fn from_bits_retain(bits: u64) -> EsdtLocalRoleFlags
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<EsdtLocalRoleFlags>
pub fn from_name(name: &str) -> Option<EsdtLocalRoleFlags>
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: EsdtLocalRoleFlags) -> bool
pub const fn intersects(&self, other: EsdtLocalRoleFlags) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
Sourcepub const fn contains(&self, other: EsdtLocalRoleFlags) -> bool
pub const fn contains(&self, other: EsdtLocalRoleFlags) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Sourcepub fn insert(&mut self, other: EsdtLocalRoleFlags)
pub fn insert(&mut self, other: EsdtLocalRoleFlags)
The bitwise or (|
) of the bits in two flags values.
Sourcepub fn remove(&mut self, other: EsdtLocalRoleFlags)
pub fn remove(&mut self, other: EsdtLocalRoleFlags)
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: EsdtLocalRoleFlags)
pub fn toggle(&mut self, other: EsdtLocalRoleFlags)
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub fn set(&mut self, other: EsdtLocalRoleFlags, value: bool)
pub fn set(&mut self, other: EsdtLocalRoleFlags, value: bool)
Call insert
when value
is true
or remove
when value
is false
.
Sourcepub const fn intersection(self, other: EsdtLocalRoleFlags) -> EsdtLocalRoleFlags
pub const fn intersection(self, other: EsdtLocalRoleFlags) -> EsdtLocalRoleFlags
The bitwise and (&
) of the bits in two flags values.
Sourcepub const fn union(self, other: EsdtLocalRoleFlags) -> EsdtLocalRoleFlags
pub const fn union(self, other: EsdtLocalRoleFlags) -> EsdtLocalRoleFlags
The bitwise or (|
) of the bits in two flags values.
Sourcepub const fn difference(self, other: EsdtLocalRoleFlags) -> EsdtLocalRoleFlags
pub const fn difference(self, other: EsdtLocalRoleFlags) -> EsdtLocalRoleFlags
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: EsdtLocalRoleFlags,
) -> EsdtLocalRoleFlags
pub const fn symmetric_difference( self, other: EsdtLocalRoleFlags, ) -> EsdtLocalRoleFlags
The bitwise exclusive-or (^
) of the bits in two flags values.
Sourcepub const fn complement(self) -> EsdtLocalRoleFlags
pub const fn complement(self) -> EsdtLocalRoleFlags
The bitwise negation (!
) of the bits in a flags value, truncating the result.
Source§impl EsdtLocalRoleFlags
impl EsdtLocalRoleFlags
Sourcepub const fn iter(&self) -> Iter<EsdtLocalRoleFlags>
pub const fn iter(&self) -> Iter<EsdtLocalRoleFlags>
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<EsdtLocalRoleFlags>
pub const fn iter_names(&self) -> IterNames<EsdtLocalRoleFlags>
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.
Source§impl EsdtLocalRoleFlags
impl EsdtLocalRoleFlags
pub fn has_role(&self, role: &EsdtLocalRole) -> bool
pub fn iter_roles(&self) -> impl Iterator<Item = &EsdtLocalRole>
Trait Implementations§
Source§impl Binary for EsdtLocalRoleFlags
impl Binary for EsdtLocalRoleFlags
Source§impl BitAnd for EsdtLocalRoleFlags
impl BitAnd for EsdtLocalRoleFlags
Source§fn bitand(self, other: EsdtLocalRoleFlags) -> EsdtLocalRoleFlags
fn bitand(self, other: EsdtLocalRoleFlags) -> EsdtLocalRoleFlags
The bitwise and (&
) of the bits in two flags values.
Source§type Output = EsdtLocalRoleFlags
type Output = EsdtLocalRoleFlags
&
operator.Source§impl BitAndAssign for EsdtLocalRoleFlags
impl BitAndAssign for EsdtLocalRoleFlags
Source§fn bitand_assign(&mut self, other: EsdtLocalRoleFlags)
fn bitand_assign(&mut self, other: EsdtLocalRoleFlags)
The bitwise and (&
) of the bits in two flags values.
Source§impl BitOr for EsdtLocalRoleFlags
impl BitOr for EsdtLocalRoleFlags
Source§fn bitor(self, other: EsdtLocalRoleFlags) -> EsdtLocalRoleFlags
fn bitor(self, other: EsdtLocalRoleFlags) -> EsdtLocalRoleFlags
The bitwise or (|
) of the bits in two flags values.
Source§type Output = EsdtLocalRoleFlags
type Output = EsdtLocalRoleFlags
|
operator.Source§impl BitOrAssign for EsdtLocalRoleFlags
impl BitOrAssign for EsdtLocalRoleFlags
Source§fn bitor_assign(&mut self, other: EsdtLocalRoleFlags)
fn bitor_assign(&mut self, other: EsdtLocalRoleFlags)
The bitwise or (|
) of the bits in two flags values.
Source§impl BitXor for EsdtLocalRoleFlags
impl BitXor for EsdtLocalRoleFlags
Source§fn bitxor(self, other: EsdtLocalRoleFlags) -> EsdtLocalRoleFlags
fn bitxor(self, other: EsdtLocalRoleFlags) -> EsdtLocalRoleFlags
The bitwise exclusive-or (^
) of the bits in two flags values.
Source§type Output = EsdtLocalRoleFlags
type Output = EsdtLocalRoleFlags
^
operator.Source§impl BitXorAssign for EsdtLocalRoleFlags
impl BitXorAssign for EsdtLocalRoleFlags
Source§fn bitxor_assign(&mut self, other: EsdtLocalRoleFlags)
fn bitxor_assign(&mut self, other: EsdtLocalRoleFlags)
The bitwise exclusive-or (^
) of the bits in two flags values.
Source§impl Clone for EsdtLocalRoleFlags
impl Clone for EsdtLocalRoleFlags
Source§fn clone(&self) -> EsdtLocalRoleFlags
fn clone(&self) -> EsdtLocalRoleFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Extend<EsdtLocalRoleFlags> for EsdtLocalRoleFlags
impl Extend<EsdtLocalRoleFlags> for EsdtLocalRoleFlags
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = EsdtLocalRoleFlags>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = EsdtLocalRoleFlags>,
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 EsdtLocalRoleFlags
impl Flags for EsdtLocalRoleFlags
Source§const FLAGS: &'static [Flag<EsdtLocalRoleFlags>]
const FLAGS: &'static [Flag<EsdtLocalRoleFlags>]
Source§fn from_bits_retain(bits: u64) -> EsdtLocalRoleFlags
fn from_bits_retain(bits: u64) -> EsdtLocalRoleFlags
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<EsdtLocalRoleFlags> for EsdtLocalRoleFlags
impl FromIterator<EsdtLocalRoleFlags> for EsdtLocalRoleFlags
Source§fn from_iter<T>(iterator: T) -> EsdtLocalRoleFlagswhere
T: IntoIterator<Item = EsdtLocalRoleFlags>,
fn from_iter<T>(iterator: T) -> EsdtLocalRoleFlagswhere
T: IntoIterator<Item = EsdtLocalRoleFlags>,
The bitwise or (|
) of the bits in each flags value.
Source§impl IntoIterator for EsdtLocalRoleFlags
impl IntoIterator for EsdtLocalRoleFlags
Source§type Item = EsdtLocalRoleFlags
type Item = EsdtLocalRoleFlags
Source§type IntoIter = Iter<EsdtLocalRoleFlags>
type IntoIter = Iter<EsdtLocalRoleFlags>
Source§fn into_iter(self) -> <EsdtLocalRoleFlags as IntoIterator>::IntoIter
fn into_iter(self) -> <EsdtLocalRoleFlags as IntoIterator>::IntoIter
Source§impl LowerHex for EsdtLocalRoleFlags
impl LowerHex for EsdtLocalRoleFlags
Source§impl Not for EsdtLocalRoleFlags
impl Not for EsdtLocalRoleFlags
Source§fn not(self) -> EsdtLocalRoleFlags
fn not(self) -> EsdtLocalRoleFlags
The bitwise negation (!
) of the bits in a flags value, truncating the result.
Source§type Output = EsdtLocalRoleFlags
type Output = EsdtLocalRoleFlags
!
operator.Source§impl Octal for EsdtLocalRoleFlags
impl Octal for EsdtLocalRoleFlags
Source§impl PartialEq for EsdtLocalRoleFlags
impl PartialEq for EsdtLocalRoleFlags
Source§impl Sub for EsdtLocalRoleFlags
impl Sub for EsdtLocalRoleFlags
Source§fn sub(self, other: EsdtLocalRoleFlags) -> EsdtLocalRoleFlags
fn sub(self, other: EsdtLocalRoleFlags) -> EsdtLocalRoleFlags
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 = EsdtLocalRoleFlags
type Output = EsdtLocalRoleFlags
-
operator.Source§impl SubAssign for EsdtLocalRoleFlags
impl SubAssign for EsdtLocalRoleFlags
Source§fn sub_assign(&mut self, other: EsdtLocalRoleFlags)
fn sub_assign(&mut self, other: EsdtLocalRoleFlags)
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.