pub trait ValidatorSnapshot {
// Required methods
fn withdrawal_credentials(&self) -> &[u8; 32];
fn effective_balance(&self) -> u64;
fn is_slashed(&self) -> bool;
fn activation_eligibility_epoch(&self) -> u64;
fn activation_epoch(&self) -> u64;
fn exit_epoch(&self) -> u64;
fn withdrawable_epoch(&self) -> u64;
fn to_ssz_bytes(&self) -> Vec<u8> ⓘ;
}Expand description
Read-only view of a validator used by the delta encoder.
Implementations provide access to the validator fields that can participate in a delta. The trait deliberately does not require a concrete validator type, allowing the same diff algorithm to operate on both flat SSZ records and native consensus-client data structures.
to_ssz_bytes is only required when a validator is
present in the target registry but not in the base registry.
Required Methods§
fn withdrawal_credentials(&self) -> &[u8; 32]
fn effective_balance(&self) -> u64
fn is_slashed(&self) -> bool
fn activation_eligibility_epoch(&self) -> u64
fn activation_epoch(&self) -> u64
fn exit_epoch(&self) -> u64
fn withdrawable_epoch(&self) -> u64
Sourcefn to_ssz_bytes(&self) -> Vec<u8> ⓘ
fn to_ssz_bytes(&self) -> Vec<u8> ⓘ
Serializes the validator to its consensus SSZ representation. Only required for validators appended to the target registry.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".