[][src]Struct casperlabs_contract_ffi::value::account::AssociatedKeys

pub struct AssociatedKeys(_);

Methods

impl AssociatedKeys[src]

pub fn empty() -> AssociatedKeys[src]

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

pub fn add_key(
    &mut self,
    key: PublicKey,
    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: &PublicKey) -> 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: PublicKey,
    weight: Weight
) -> Result<(), UpdateKeyFailure>
[src]

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

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

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

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

pub fn calculate_keys_weight(
    &self,
    authorization_keys: &BTreeSet<PublicKey>
) -> 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

Trait Implementations

impl ToBytes for AssociatedKeys[src]

impl FromBytes for AssociatedKeys[src]

impl PartialEq<AssociatedKeys> for AssociatedKeys[src]

impl Eq for AssociatedKeys[src]

impl Ord for AssociatedKeys[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl PartialOrd<AssociatedKeys> for AssociatedKeys[src]

impl Debug for AssociatedKeys[src]

impl Clone for AssociatedKeys[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for AssociatedKeys[src]

Auto Trait Implementations

Blanket Implementations

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> Into<U> for T where
    U: From<T>, 
[src]

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

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> Same<T> for T

type Output = T

Should always be Self