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

pub struct ActionThresholds { /* fields omitted */ }

Thresholds that have to be met when executing an action of a certain type.

Implementations

impl ActionThresholds[src]

pub fn new(
    deployment: Weight,
    key_management: Weight
) -> Result<ActionThresholds, SetThresholdFailure>
[src]

Creates new ActionThresholds object with provided weights

Requires deployment threshold to be lower than or equal to key management threshold.

pub fn set_deployment_threshold(
    &mut self,
    new_threshold: Weight
) -> Result<(), SetThresholdFailure>
[src]

Sets new threshold for ActionType::Deployment. Should return an error if setting new threshold for action_type breaks one of the invariants. Currently, invariant is that ActionType::Deployment threshold shouldn't be higher than any other, which should be checked both when increasing Deployment threshold and decreasing the other.

pub fn set_key_management_threshold(
    &mut self,
    new_threshold: Weight
) -> Result<(), SetThresholdFailure>
[src]

Sets new threshold for ActionType::KeyManagement.

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

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

pub fn set_threshold(
    &mut self,
    action_type: ActionType,
    new_threshold: Weight
) -> Result<(), SetThresholdFailure>
[src]

Unified function that takes an action type, and changes appropriate threshold defined by the ActionType variants.

Trait Implementations

impl Clone for ActionThresholds[src]

impl Debug for ActionThresholds[src]

impl Default for ActionThresholds[src]

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

impl Eq for ActionThresholds[src]

impl FromBytes for ActionThresholds[src]

impl PartialEq<ActionThresholds> for ActionThresholds[src]

impl Serialize for ActionThresholds[src]

impl StructuralEq for ActionThresholds[src]

impl StructuralPartialEq for ActionThresholds[src]

impl ToBytes for ActionThresholds[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>,