hyperlane_broadcast/
lib.rs

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