Struct move_lang::expansion::ast::AbilitySet
source · pub struct AbilitySet(_);
Implementations§
source§impl AbilitySet
impl AbilitySet
sourcepub const PRIMITIVES: [Ability_; 3] = _
pub const PRIMITIVES: [Ability_; 3] = _
Abilities for bool, u8, u64, u128, and address
sourcepub const REFERENCES: [Ability_; 2] = _
pub const REFERENCES: [Ability_; 2] = _
Abilities for &_ and &mut _
sourcepub const COLLECTION: [Ability_; 3] = _
pub const COLLECTION: [Ability_; 3] = _
Abilities for vector<_>, note they are predicated on the type argument
pub fn empty() -> Self
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn add(&mut self, a: Ability) -> Result<(), Loc>
pub fn has_ability(&self, a: &Ability) -> bool
pub fn has_ability_(&self, a: Ability_) -> bool
pub fn intersect(&self, other: &Self) -> Self
pub fn union(&self, other: &Self) -> Self
pub fn is_subset(&self, other: &Self) -> bool
pub fn iter(&self) -> AbilitySetIter<'_> ⓘ
pub fn from_abilities( iter: impl IntoIterator<Item = Ability> ) -> Result<Self, (Ability_, Loc, Loc)>
pub fn from_abilities_( loc: Loc, iter: impl IntoIterator<Item = Ability_> ) -> Result<Self, (Ability_, Loc, Loc)>
pub fn all(loc: Loc) -> Self
pub fn primitives(loc: Loc) -> Self
pub fn references(loc: Loc) -> Self
pub fn signer(loc: Loc) -> Self
pub fn collection(loc: Loc) -> Self
Trait Implementations§
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<'a> IntoIterator for &'a AbilitySet
impl<'a> IntoIterator for &'a 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 moreimpl Eq for AbilitySet
impl StructuralEq for AbilitySet
impl StructuralPartialEq for AbilitySet
Auto Trait Implementations§
impl RefUnwindSafe for AbilitySet
impl Send for AbilitySet
impl Sync for AbilitySet
impl Unpin for AbilitySet
impl UnwindSafe for AbilitySet
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.