[−][src]Struct casperlabs_engine_shared::account::AssociatedKeys
Methods
impl 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 len(&self) -> usize
[src]
pub fn is_empty(&self) -> bool
[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
pub fn total_keys_weight_excluding(&self, public_key: PublicKey) -> Weight
[src]
Calculates total weight of all authorization keys excluding a given key
Trait Implementations
impl Clone for AssociatedKeys
[src]
fn clone(&self) -> AssociatedKeys
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for AssociatedKeys
[src]
impl Default for AssociatedKeys
[src]
fn default() -> AssociatedKeys
[src]
impl Eq for AssociatedKeys
[src]
impl FromBytes for AssociatedKeys
[src]
fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>
[src]
fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>
[src]
impl Ord for AssociatedKeys
[src]
fn cmp(&self, other: &AssociatedKeys) -> Ordering
[src]
#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<AssociatedKeys> for AssociatedKeys
[src]
fn eq(&self, other: &AssociatedKeys) -> bool
[src]
fn ne(&self, other: &AssociatedKeys) -> bool
[src]
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 StructuralEq for AssociatedKeys
[src]
impl StructuralPartialEq for AssociatedKeys
[src]
impl ToBytes for AssociatedKeys
[src]
Auto Trait Implementations
impl RefUnwindSafe for AssociatedKeys
impl Send for AssociatedKeys
impl Sync for AssociatedKeys
impl Unpin for AssociatedKeys
impl UnwindSafe for AssociatedKeys
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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, 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> 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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,