1#![allow(unused_features, reason = "remove this once `return_type_notation` is stabilized")]
2#![cfg_attr(docsrs, feature(doc_cfg))]
3#![cfg_attr(feature = "_bench", feature(test))]
4#![cfg_attr(feature = "nightly", feature(random, return_type_notation))]
5#![doc = include_str!("../README.md")]
6#![no_std]
7
8extern crate alloc;
9#[cfg(feature = "std")]
10extern crate std;
11#[allow(unused_extern_crates, reason = "selection of features")]
12#[cfg(all(feature = "_bench", test))]
13extern crate test;
14
15#[macro_use]
16mod macros;
17
18#[cfg(feature = "asn1")]
19pub mod asn1;
20#[cfg(all(feature = "_bench", test))]
21pub(crate) mod bench;
22pub mod calendar;
23#[cfg(feature = "client-api-framework")]
24pub mod client_api_framework;
25pub mod codec;
26pub mod collection;
27#[cfg(feature = "crypto")]
28pub mod crypto;
29#[cfg(feature = "database")]
30pub mod database;
31mod error;
32#[cfg(feature = "executor")]
33pub mod executor;
34#[cfg(feature = "grpc")]
35pub mod grpc;
36#[cfg(feature = "http")]
37pub mod http;
38#[cfg(feature = "http2")]
39pub mod http2;
40pub mod misc;
41pub mod pool;
42pub mod rng;
43pub mod stream;
44pub mod sync;
45#[cfg(test)]
46mod tests;
47#[cfg(feature = "web-socket")]
48pub mod web_socket;
49#[cfg(feature = "x509")]
50pub mod x509;
51
52pub use error::{Error, RecvError, SendError};
53#[cfg(feature = "macros")]
54pub use wtx_macros::*;
55
56pub(crate) const _MAX_PAYLOAD_LEN: usize = 64 * 1024 * 1024;
57pub(crate) const _SIMD_LEN: usize = _simd! {
58 4 => 4,
59 16 => 16,
60 32 => 32,
61 64 => 64
62};
63
64pub type Result<T> = core::result::Result<T, Error>;