pub trait Broadcaster:
Clone
+ Send
+ 'static {
type Recipients;
type Message: Codec + Clone + Send + 'static;
// Required method
fn broadcast(
&self,
recipients: Self::Recipients,
message: Self::Message,
) -> Feedback;
}Expand description
Broadcaster is the interface responsible for attempting replication of messages across a network.
Required Associated Types§
Sourcetype Recipients
type Recipients
The type of recipients that can receive messages.
Required Methods§
Sourcefn broadcast(
&self,
recipients: Self::Recipients,
message: Self::Message,
) -> Feedback
fn broadcast( &self, recipients: Self::Recipients, message: Self::Message, ) -> Feedback
Attempt to broadcast a message to the associated recipients.
Feedback indicates whether the local broadcast request was accepted for processing. It does not indicate whether recipients received the message.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".