[][src]Struct casper_execution_engine::shared::account::AssociatedKeys

pub struct AssociatedKeys(_);

Implementations

impl AssociatedKeys[src]

pub fn new(key: AccountHash, weight: Weight) -> AssociatedKeys[src]

pub fn add_key(
    &mut self,
    key: AccountHash,
    weight: Weight
) -> Result<(), AddKeyFailure>
[src]

Adds new AssociatedKey to the set. Returns true if added successfully, false otherwise.

pub fn remove_key(&mut self, key: &AccountHash) -> Result<(), RemoveKeyFailure>[src]

Removes key from the associated keys set. Returns true if value was found in the set prior to the removal, false otherwise.

pub fn update_key(
    &mut self,
    key: AccountHash,
    weight: Weight
) -> Result<(), UpdateKeyFailure>
[src]

Adds new AssociatedKey to the set. Returns true if added successfully, false otherwise.

pub fn get(&self, key: &AccountHash) -> Option<&Weight>[src]

pub fn contains_key(&self, key: &AccountHash) -> bool[src]

pub fn iter(&self) -> impl Iterator<Item = (&AccountHash, &Weight)>[src]

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn calculate_keys_weight(
    &self,
    authorization_keys: &BTreeSet<AccountHash>
) -> Weight
[src]

Calculates total weight of authorization keys provided by an argument

pub fn total_keys_weight(&self) -> Weight[src]

Calculates total weight of all authorization keys

pub fn total_keys_weight_excluding(&self, account_hash: AccountHash) -> Weight[src]

Calculates total weight of all authorization keys excluding a given key

Trait Implementations

impl Clone for AssociatedKeys[src]

impl Debug for AssociatedKeys[src]

impl Default for AssociatedKeys[src]

impl<'de> Deserialize<'de> for AssociatedKeys[src]

impl Eq for AssociatedKeys[src]

impl FromBytes for AssociatedKeys[src]

impl Ord for AssociatedKeys[src]

impl PartialEq<AssociatedKeys> for AssociatedKeys[src]

impl PartialOrd<AssociatedKeys> for AssociatedKeys[src]

impl Serialize for AssociatedKeys[src]

impl StructuralEq for AssociatedKeys[src]

impl StructuralPartialEq for AssociatedKeys[src]

impl ToBytes for AssociatedKeys[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> FromBits<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,