websocket_util/
lib.rs

1// Copyright (C) 2019-2024 Daniel Mueller <deso@posteo.net>
2// SPDX-License-Identifier: GPL-3.0-or-later
3
4#![warn(
5  bad_style,
6  dead_code,
7  future_incompatible,
8  improper_ctypes,
9  late_bound_lifetime_arguments,
10  missing_copy_implementations,
11  missing_debug_implementations,
12  missing_docs,
13  no_mangle_generic_items,
14  non_shorthand_field_patterns,
15  nonstandard_style,
16  overflowing_literals,
17  path_statements,
18  patterns_in_fns_without_body,
19  proc_macro_derive_resolution_fallback,
20  renamed_and_removed_lints,
21  rust_2018_compatibility,
22  rust_2018_idioms,
23  stable_features,
24  trivial_bounds,
25  trivial_numeric_casts,
26  type_alias_bounds,
27  tyvar_behind_raw_pointer,
28  unconditional_recursion,
29  unreachable_code,
30  unreachable_patterns,
31  unstable_features,
32  unstable_name_collisions,
33  unused,
34  unused_comparisons,
35  unused_import_braces,
36  unused_lifetimes,
37  unused_qualifications,
38  unused_results,
39  while_true,
40  rustdoc::broken_intra_doc_links
41)]
42#![allow(clippy::let_unit_value)]
43
44//! A crate for providing utility functionality on top of a WebSocket
45//! channel.
46
47/// Logic for associating a subscription-style controller object with a
48/// WebSocket stream.
49pub mod subscribe;
50/// Functionality for wrapping a WebSocket stream, adding automated
51/// support for handling of control messages.
52pub mod wrap;
53
54/// Re-export of the tungstenite version the crate interfaces with.
55pub use tokio_tungstenite::tungstenite;
56
57/// A module providing functionality for testing WebSocket streams.
58#[cfg(any(test, feature = "test"))]
59pub mod test;