Skip to main content

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
9mod broadcast;
10mod broadcast_map;
11
12pub use {broadcast::*, broadcast_map::*};
13
14#[cfg(test)]
15use std::time::Duration;
16use std::{fmt::Debug, hash::BuildHasherDefault};
17
18#[cfg(test)]
19use tokio::{
20    sync::broadcast::error::RecvError,
21    time::{error::Elapsed, timeout},
22};
23use {
24    dashmap::{mapref::one::Ref, *},
25    tokio::sync::broadcast::{
26        error::SendError,
27        {Receiver, Sender},
28    },
29    twox_hash::XxHash3_64,
30};