hyperlane_broadcast/broadcast_map/
type.rs

1use crate::*;
2
3/// Represents an error that occurs when attempting to send a message via a broadcast channel within a map.
4pub type BroadcastMapSendError<T> = SendError<T>;
5/// Represents the result of a broadcast map send operation, indicating either success with an optional receiver count or an error.
6pub type BroadcastMapSendResult<T> = Result<Option<ReceiverCount>, BroadcastMapSendError<T>>;
7/// Represents a receiver endpoint for a broadcast channel within a map, allowing consumption of broadcasted messages.
8pub type BroadcastMapReceiver<T> = Receiver<T>;
9/// Represents an optional broadcast channel.
10pub type OptionBroadcast<T> = Option<Broadcast<T>>;
11/// Represents an optional receiver endpoint for a broadcast channel within a map.
12pub type OptionBroadcastMapReceiver<T> = Option<BroadcastMapReceiver<T>>;
13/// Represents a sender endpoint for a broadcast channel within a map, used to dispatch messages.
14pub type BroadcastMapSender<T> = Sender<T>;
15/// Represents an optional sender endpoint for a broadcast channel within a map.
16pub type OptionBroadcastMapSender<T> = Option<BroadcastMapSender<T>>;
17/// Represents an optional count of active receivers.
18pub type OptionReceiverCount = Option<ReceiverCount>;
19/// A concurrent, thread-safe map where keys are strings and values are broadcast channels.
20pub type DashMapStringBroadcast<T> = DashMap<String, Broadcast<T>>;