hyperlane_broadcast/broadcast/type.rs
1use crate::*;
2
3/// Represents the number of active receivers subscribed to a broadcast channel.
4pub type ReceiverCount = usize;
5/// Represents an error that occurs when attempting to send a message via broadcast.
6pub type BroadcastSendError<T> = SendError<T>;
7/// Represents the result of a broadcast send operation, indicating either success with the number of receivers or an error.
8pub type BroadcastSendResult<T> = Result<ReceiverCount, BroadcastSendError<T>>;
9/// Represents a receiver endpoint for a broadcast channel, allowing consumption of broadcasted messages.
10pub type BroadcastReceiver<T> = Receiver<T>;
11/// Represents a sender endpoint for a broadcast channel, used to dispatch messages to all subscribed receivers.
12pub type BroadcastSender<T> = Sender<T>;
13/// Represents the maximum capacity or buffer size of a broadcast channel.
14pub type Capacity = usize;