Struct move_binary_format::file_format::AbilitySet
source · pub struct AbilitySet(_);
Expand description
A set of Ability
s
Implementations§
source§impl AbilitySet
impl AbilitySet
sourcepub const PRIMITIVES: AbilitySet = _
pub const PRIMITIVES: AbilitySet = _
Abilities for Bool
, U8
, U64
, U128
, and Address
sourcepub const REFERENCES: AbilitySet = _
pub const REFERENCES: AbilitySet = _
Abilities for Reference
and MutableReference
sourcepub const SIGNER: AbilitySet = _
pub const SIGNER: AbilitySet = _
Abilities for Signer
sourcepub const VECTOR: AbilitySet = _
pub const VECTOR: AbilitySet = _
Abilities for Vector
, note they are predicated on the type argument
pub fn has_ability(self, ability: Ability) -> bool
pub fn has_copy(self) -> bool
pub fn has_drop(self) -> bool
pub fn has_store(self) -> bool
pub fn has_key(self) -> bool
pub fn remove(self, ability: Ability) -> Self
pub fn intersect(self, other: Self) -> Self
pub fn union(self, other: Self) -> Self
pub fn is_subset(self, other: Self) -> bool
sourcepub fn polymorphic_abilities<I1, I2>(
declared_abilities: Self,
declared_phantom_parameters: I1,
type_arguments: I2
) -> PartialVMResult<Self>where
I1: IntoIterator<Item = bool>,
I2: IntoIterator<Item = Self>,
I1::IntoIter: ExactSizeIterator,
I2::IntoIter: ExactSizeIterator,
pub fn polymorphic_abilities<I1, I2>( declared_abilities: Self, declared_phantom_parameters: I1, type_arguments: I2 ) -> PartialVMResult<Self>where I1: IntoIterator<Item = bool>, I2: IntoIterator<Item = Self>, I1::IntoIter: ExactSizeIterator, I2::IntoIter: ExactSizeIterator,
For a polymorphic type, its actual abilities correspond to its declared abilities but
predicated on its non-phantom type arguments having that ability. For Key
, instead of needing
the same ability, the type arguments need Store
.
pub fn from_u8(byte: u8) -> Option<Self>
pub fn into_u8(self) -> u8
Trait Implementations§
source§impl Arbitrary for AbilitySet
impl Arbitrary for AbilitySet
§type Strategy = BoxedStrategy<AbilitySet>
type Strategy = BoxedStrategy<AbilitySet>
The type of
Strategy
used to generate values of type Self
.§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.source§fn arbitrary_with(_params: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_params: Self::Parameters) -> Self::Strategy
source§impl BitOr<Ability> for AbilitySet
impl BitOr<Ability> for AbilitySet
source§impl BitOr<AbilitySet> for AbilitySet
impl BitOr<AbilitySet> for AbilitySet
source§impl Clone for AbilitySet
impl Clone for AbilitySet
source§fn clone(&self) -> AbilitySet
fn clone(&self) -> AbilitySet
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AbilitySet
impl Debug for AbilitySet
source§impl Hash for AbilitySet
impl Hash for AbilitySet
source§impl IntoIterator for AbilitySet
impl IntoIterator for AbilitySet
source§impl Ord for AbilitySet
impl Ord for AbilitySet
source§fn cmp(&self, other: &AbilitySet) -> Ordering
fn cmp(&self, other: &AbilitySet) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<AbilitySet> for AbilitySet
impl PartialEq<AbilitySet> for AbilitySet
source§fn eq(&self, other: &AbilitySet) -> bool
fn eq(&self, other: &AbilitySet) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<AbilitySet> for AbilitySet
impl PartialOrd<AbilitySet> for AbilitySet
source§fn partial_cmp(&self, other: &AbilitySet) -> Option<Ordering>
fn partial_cmp(&self, other: &AbilitySet) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more