pub trait SendValidatorSet<AccountId> {
type Destination: Parameter;
// Required method
fn send(
destination: &Self::Destination,
era: EraIndex,
validators: &[AccountId],
) -> Result<(), ()>;
// Provided methods
fn message_size(
_destination: &Self::Destination,
era: EraIndex,
validators: &[AccountId],
) -> usize
where AccountId: Encode { ... }
fn max_message_size(_destination: &Self::Destination) -> Option<usize> { ... }
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 message_size(
_destination: &Self::Destination,
era: EraIndex,
validators: &[AccountId],
) -> usizewhere
AccountId: Encode,
fn message_size(
_destination: &Self::Destination,
era: EraIndex,
validators: &[AccountId],
) -> usizewhere
AccountId: Encode,
The encoded size of what Self::send sends to destination.
By default the encoded era and validators, as if the transport added nothing: an XCM
envelope adds a few bytes. Checked against Self::max_message_size in the pallet’s
integrity_test.
Sourcefn max_message_size(_destination: &Self::Destination) -> Option<usize>
fn max_message_size(_destination: &Self::Destination) -> Option<usize>
The largest message the transport accepts for destination, None without a limit.
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.