Struct move_binary_format::file_format::AbilitySet  
source · [−]pub struct AbilitySet(_);Expand description
A set of Abilitys
Implementations
sourceimpl 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
sourceimpl BitOr<Ability> for AbilitySet
 
impl BitOr<Ability> for AbilitySet
sourceimpl BitOr<AbilitySet> for AbilitySet
 
impl BitOr<AbilitySet> for AbilitySet
type Output = AbilitySet
type Output = AbilitySet
The resulting type after applying the | operator.
sourceimpl Clone for AbilitySet
 
impl Clone for AbilitySet
sourcefn clone(&self) -> AbilitySet
 
fn clone(&self) -> AbilitySet
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for AbilitySet
 
impl Debug for AbilitySet
sourceimpl<'de> Deserialize<'de> for AbilitySet
 
impl<'de> Deserialize<'de> for AbilitySet
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Hash for AbilitySet
 
impl Hash for AbilitySet
sourceimpl IntoIterator for AbilitySet
 
impl IntoIterator for AbilitySet
sourceimpl Ord for AbilitySet
 
impl Ord for AbilitySet
sourcefn cmp(&self, other: &AbilitySet) -> Ordering
 
fn cmp(&self, other: &AbilitySet) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
 
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
 
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
    Self: PartialOrd<Self>, 
 
fn clamp(self, min: Self, max: Self) -> Self where
    Self: PartialOrd<Self>, 
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<AbilitySet> for AbilitySet
 
impl PartialEq<AbilitySet> for AbilitySet
sourcefn 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 ==. Read more
sourceimpl PartialOrd<AbilitySet> for AbilitySet
 
impl PartialOrd<AbilitySet> for AbilitySet
sourcefn partial_cmp(&self, other: &AbilitySet) -> Option<Ordering>
 
fn partial_cmp(&self, other: &AbilitySet) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
 
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn 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
sourceimpl Serialize for AbilitySet
 
impl Serialize for AbilitySet
impl Copy for AbilitySet
impl 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
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more