[−][src]Struct casperlabs_contract_ffi::value::account::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]
&mut self,
key: PublicKey,
weight: Weight
) -> Result<(), AddKeyFailure>
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]
&mut self,
key: PublicKey,
weight: Weight
) -> Result<(), UpdateKeyFailure>
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]
&self,
authorization_keys: &BTreeSet<PublicKey>
) -> Weight
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]
fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>
[src]
impl PartialEq<AssociatedKeys> for AssociatedKeys
[src]
fn eq(&self, other: &AssociatedKeys) -> bool
[src]
fn ne(&self, other: &AssociatedKeys) -> bool
[src]
impl Eq for AssociatedKeys
[src]
impl Ord for AssociatedKeys
[src]
fn cmp(&self, other: &AssociatedKeys) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl PartialOrd<AssociatedKeys> for AssociatedKeys
[src]
fn partial_cmp(&self, other: &AssociatedKeys) -> Option<Ordering>
[src]
fn lt(&self, other: &AssociatedKeys) -> bool
[src]
fn le(&self, other: &AssociatedKeys) -> bool
[src]
fn gt(&self, other: &AssociatedKeys) -> bool
[src]
fn ge(&self, other: &AssociatedKeys) -> bool
[src]
impl Debug for AssociatedKeys
[src]
impl Clone for AssociatedKeys
[src]
fn clone(&self) -> 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]
fn default() -> AssociatedKeys
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self