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
6/// Represents an error that occurs when attempting to send a message via broadcast.
7pub type BroadcastSendError<T> = SendError<T>;
8
9/// Represents the result of a broadcast send operation, indicating either success with the number of receivers or an error.
10pub type BroadcastSendResult<T> = Result<ReceiverCount, BroadcastSendError<T>>;
11
12/// Represents a receiver endpoint for a broadcast channel, allowing consumption of broadcasted messages.
13pub type BroadcastReceiver<T> = Receiver<T>;
14
15/// Represents a sender endpoint for a broadcast channel, used to dispatch messages to all subscribed receivers.
16pub type BroadcastSender<T> = Sender<T>;
17
18/// Represents the maximum capacity or buffer size of a broadcast channel.
19pub type Capacity = usize;