pub trait Relay:
Clone
+ Send
+ 'static {
type Digest: Digest;
type PublicKey: PublicKey;
type Plan: Send;
// Required method
fn broadcast(
&mut self,
payload: Self::Digest,
plan: Self::Plan,
) -> impl Future<Output = ()> + Send;
}Expand description
Relay is the interface responsible for broadcasting payloads to the network.
The consensus engine is only aware of a payload’s digest, not its contents. It is up to the relay to efficiently broadcast the full payload to other participants.
Required Associated Types§
Required Methods§
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.