hyperlane_broadcast/
lib.rs

1//! hyperlane-broadcast is a lightweight
2//! and ergonomic wrapper over Tokio’s broadcast channel designed
3//! for easy-to-use publish-subscribe messaging in async Rust applications.
4//! It simplifies the native Tokio broadcast API by providing a straightforward
5//! interface for broadcasting messages to multiple subscribers with minimal boilerplate.
6
7/// Internal module for core broadcast functionalities.
8pub(crate) mod broadcast;
9/// Internal module for managing broadcast maps.
10pub(crate) mod broadcast_map;
11/// Internal module for configuration.
12pub(crate) mod cfg;
13
14/// Re-exports constants, structs, traits, and types from the `broadcast` module.
15pub use broadcast::{r#const::*, r#struct::*, r#trait::*, r#type::*};
16/// Re-exports structs, traits, and types from the `broadcast_map` module.
17pub use broadcast_map::{r#struct::*, r#trait::*, r#type::*};
18
19/// Re-exports `dashmap` for concurrent hash map functionalities.
20pub(crate) use dashmap::*;
21/// Re-exports `Debug` trait for debugging purposes.
22pub(crate) use std::fmt::Debug;
23/// Re-exports `Receiver` and `Sender` from `tokio::sync::broadcast` for asynchronous message passing.
24pub(crate) use tokio::sync::broadcast::{
25    error::SendError,
26    {Receiver, Sender},
27};