Skip to main content

ValidatorMutTarget

Trait ValidatorMutTarget 

Source
pub trait ValidatorMutTarget {
    type Validator<'a>: ValidatorMut
       where Self: 'a;

    // Required methods
    fn get_mut(&mut self, index: usize) -> Option<Self::Validator<'_>>;
    fn push_from_ssz(&mut self, ssz_bytes: &[u8]);
}
Expand description

Mutable access to a validator collection used during reconstruction.

This trait abstracts over the client’s validator storage representation. Implementations may back the collection with a contiguous vector, a persistent list, a tree, or another native data structure.

The collection is expected to preserve validator ordering: validator index i in the delta must refer to the same validator index i in the target collection.

New validators are supplied as complete consensus SSZ records through push_from_ssz.

Required Associated Types§

Source

type Validator<'a>: ValidatorMut where Self: 'a

Required Methods§

Source

fn get_mut(&mut self, index: usize) -> Option<Self::Validator<'_>>

Fetches a mutable validator view by index.

Source

fn push_from_ssz(&mut self, ssz_bytes: &[u8])

Appends a newly seen validator from its raw SSZ bytes.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§