[−][src]Struct casper_execution_engine::shared::account::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]
&mut self,
key: AccountHash,
weight: Weight
) -> Result<(), AddKeyFailure>
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]
&mut self,
key: AccountHash,
weight: Weight
) -> Result<(), UpdateKeyFailure>
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]
&self,
authorization_keys: &BTreeSet<AccountHash>
) -> 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, account_hash: AccountHash) -> 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<'de> Deserialize<'de> for AssociatedKeys
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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 Serialize for AssociatedKeys
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> FromBits<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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.
pub 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>,