pub trait Broadcaster:
Clone
+ Send
+ 'static {
type Digest: Array;
// Required method
fn broadcast(
&mut self,
payload: Self::Digest,
) -> impl Future<Output = Receiver<bool>> + Send;
}Expand description
Broadcaster is the interface responsible for replication of messages across a network.
Required Associated Types§
Required Methods§
Sourcefn broadcast(
&mut self,
payload: Self::Digest,
) -> impl Future<Output = Receiver<bool>> + Send
fn broadcast( &mut self, payload: Self::Digest, ) -> impl Future<Output = Receiver<bool>> + Send
Attempt to broadcast a digest to the network.
Returns a future that resolves to a boolean indicating success. The broadcast may fail for a variety of reasons such-as networking errors, the node not being a valid sequencer, or the Broadcaster not being ready to broadcast a new payload.
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.