referrerpolicy=no-referrer-when-downgrade

SendValidatorSet

Trait SendValidatorSet 

Source
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§

Source

type Destination: Parameter

Identifies a destination.

Required Methods§

Source

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§

Source

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.

Implementations on Foreign Types§

Source§

impl<AccountId> SendValidatorSet<AccountId> for ()

Source§

type Destination = ()

Source§

fn send(_: &(), _: EraIndex, _: &[AccountId]) -> Result<(), ()>

Implementors§