[−][src]Struct casperlabs_engine_shared::account::ActionThresholds
Thresholds that have to be met when executing an action of a certain type.
Methods
impl ActionThresholds
[src]
pub fn new(
deployment: Weight,
key_management: Weight
) -> Result<ActionThresholds, SetThresholdFailure>
[src]
deployment: Weight,
key_management: Weight
) -> Result<ActionThresholds, SetThresholdFailure>
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]
&mut self,
new_threshold: Weight
) -> Result<(), SetThresholdFailure>
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]
&mut self,
new_threshold: Weight
) -> Result<(), SetThresholdFailure>
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]
&mut self,
action_type: ActionType,
new_threshold: Weight
) -> Result<(), SetThresholdFailure>
Unified function that takes an action type, and changes appropriate threshold defined by the ActionType variants.
Trait Implementations
impl Clone for ActionThresholds
[src]
fn clone(&self) -> ActionThresholds
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ActionThresholds
[src]
impl Default for ActionThresholds
[src]
impl Eq for ActionThresholds
[src]
impl FromBytes for ActionThresholds
[src]
fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>
[src]
fn from_vec(bytes: Vec<u8>) -> Result<(Self, Vec<u8>), Error>
[src]
impl PartialEq<ActionThresholds> for ActionThresholds
[src]
fn eq(&self, other: &ActionThresholds) -> bool
[src]
fn ne(&self, other: &ActionThresholds) -> bool
[src]
impl StructuralEq for ActionThresholds
[src]
impl StructuralPartialEq for ActionThresholds
[src]
impl ToBytes for ActionThresholds
[src]
Auto Trait Implementations
impl RefUnwindSafe for ActionThresholds
impl Send for ActionThresholds
impl Sync for ActionThresholds
impl Unpin for ActionThresholds
impl UnwindSafe for ActionThresholds
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>,