1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! WebSocket (WS) support for rama ([RFC 6455]).
//!
//! [RFC 6455]: https://datatracker.ietf.org/doc/html/rfc6455
//!
//! # Cancel safety
//!
//! Reading messages is cancel-safe. `AsyncWebSocket` has no dedicated read
//! methods; messages arrive through its `Stream` implementation, and reading a
//! message via `StreamExt::next` follows that trait's cancel-safety: if the
//! `next()` future is dropped before it resolves (for example, as a branch of
//! `tokio::select!` that another branch completes first), no message is lost.
//! The next poll resumes from the same position in the stream.
//!
//! The `Sink` side (sending) does not carry a documented cancel-safety
//! guarantee.
//!
//! # Rama
//!
//! Crate used by the end-user `rama` crate and `rama` crate authors alike.
//!
//! Learn more about `rama`:
//!
//! - Github: <https://github.com/plabayo/rama>
//! - Book: <https://ramaproxy.org/book/>
pub use crate;
pub use AsyncWebSocket;