pub trait SendValidatorSet<AccountId> {
type Destination: Parameter;
// Required method
fn send(
destination: &Self::Destination,
era: EraIndex,
validators: &[AccountId],
) -> Result<(), ()>;
// Provided method
fn ensure_successful_send(_destination: &Self::Destination) { ... }
}Expand description
Sends a validator set to one destination.
Required Associated Types§
Sourcetype Destination: Parameter
type Destination: Parameter
Identifies a destination.
Required Methods§
Sourcefn send(
destination: &Self::Destination,
era: EraIndex,
validators: &[AccountId],
) -> Result<(), ()>
fn send( destination: &Self::Destination, era: EraIndex, validators: &[AccountId], ) -> Result<(), ()>
Hand the validator set of era to the transport for destination.
Ok means the set was accepted for delivery, not that the destination applied it.
Provided Methods§
Sourcefn ensure_successful_send(_destination: &Self::Destination)
fn ensure_successful_send(_destination: &Self::Destination)
Prepare destination so that Self::send succeeds in benchmarks.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.