Skip to main content

ValidatorMut

Trait ValidatorMut 

Source
pub trait ValidatorMut {
    // Required methods
    fn is_slashed(&self) -> bool;
    fn set_withdrawal_credentials(&mut self, value: &[u8; 32]);
    fn set_effective_balance(&mut self, value: u64);
    fn set_slashed(&mut self, value: bool);
    fn set_activation_eligibility_epoch(&mut self, value: u64);
    fn set_activation_epoch(&mut self, value: u64);
    fn set_exit_epoch(&mut self, value: u64);
    fn set_withdrawable_epoch(&mut self, value: u64);
}
Expand description

Mutable view of a validator used during delta reconstruction.

Implementations expose the fields that may be modified by a ValidatorField patch.

The current slashed status is required so that applying an exit_epoch patch can deterministically reconstruct withdrawable_epoch for non-slashed validators.

Required Methods§

Source

fn is_slashed(&self) -> bool

Returns the current slashed status. Required for deterministic reconstruction of withdrawable_epoch when exit_epoch changes.

Source

fn set_withdrawal_credentials(&mut self, value: &[u8; 32])

Source

fn set_effective_balance(&mut self, value: u64)

Source

fn set_slashed(&mut self, value: bool)

Source

fn set_activation_eligibility_epoch(&mut self, value: u64)

Source

fn set_activation_epoch(&mut self, value: u64)

Source

fn set_exit_epoch(&mut self, value: u64)

Source

fn set_withdrawable_epoch(&mut self, value: u64)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§