hyperlane_broadcast/broadcast/
struct.rs

1use crate::*;
2
3/// Represents a broadcast mechanism for sending messages to multiple receivers.
4///
5/// This struct encapsulates the core components required for broadcasting,
6/// including the capacity of the broadcast channel and the sender responsible
7/// for dispatching messages.
8#[derive(Debug, Clone)]
9pub struct Broadcast<T: BroadcastTrait> {
10    /// The maximum number of messages that can be buffered in the broadcast channel.
11    pub(super) capacity: Capacity,
12    /// The sender component responsible for distributing messages to all connected receivers.
13    pub(super) sender: BroadcastSender<T>,
14}