Skip to main content

hyperlane_plugin_websocket/
lib.rs

1//! hyperlane-plugin-websocket
2//!
3//! A WebSocket plugin for the Hyperlane framework,
4//! providing robust WebSocket communication capabilities and integrating
5//! with hyperlane-broadcast for efficient message dissemination.
6
7mod r#const;
8mod r#enum;
9mod r#fn;
10mod r#impl;
11mod r#static;
12mod r#struct;
13mod r#trait;
14mod r#type;
15
16#[cfg(test)]
17#[path = "../tests/mod.rs"]
18mod tests;
19
20pub use {r#enum::*, r#struct::*, r#trait::*};
21
22pub(crate) use {r#const::*, r#fn::*, r#static::*, r#type::*};
23
24use std::{
25    array::from_fn,
26    cell::{RefCell, RefMut},
27    collections::{HashMap, VecDeque},
28    convert::Infallible,
29    fmt::{self, Debug, Formatter, Write},
30    hash::{BuildHasherDefault, Hasher},
31    mem::take,
32    net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr},
33    num::{
34        NonZeroI8, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI128, NonZeroIsize, NonZeroU8,
35        NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU128, NonZeroUsize,
36    },
37    pin::{Pin, pin},
38    str::from_utf8,
39    sync::{
40        Arc, Mutex, MutexGuard, OnceLock, RwLock, RwLockReadGuard,
41        atomic::{AtomicUsize, Ordering},
42    },
43};
44
45use {
46    hyperlane::{
47        tokio::sync::{
48            Notify,
49            broadcast::{
50                Receiver,
51                error::{RecvError, SendError, TryRecvError},
52            },
53            futures::Notified,
54        },
55        *,
56    },
57    lombok_macros::*,
58    tokio_broadcast::*,
59};