1#![deny(clippy::pedantic)]
36#![allow(
37 type_alias_bounds,
38 missing_debug_implementations,
39 clippy::cast_possible_truncation,
40 clippy::missing_errors_doc,
41 clippy::missing_fields_in_debug,
42 clippy::missing_panics_doc,
43 clippy::must_use_candidate,
44 clippy::too_many_lines,
45 clippy::type_complexity,
46 clippy::unused_async_trait_impl
47)]
48#![cfg_attr(any(docsrs, docsrs_dep), feature(rustdoc_internals))]
50
51#[cfg(not(test))] pub use ntex_macros::{rt_main as main, rt_test as test};
53
54#[cfg(test)]
55pub(crate) use ntex_macros::rt_test_internal as rt_test;
56
57pub use ntex_service::{forward_ready, forward_shutdown};
58
59pub mod client;
60pub mod http;
61pub mod web;
62
63#[cfg(feature = "ws")]
64pub mod ws;
65
66pub use urly as url;
67
68pub use self::service::{
69 Ctx, IntoService, IntoServiceFactory, Middleware, Service, ServiceFactory, cfg::Cfg,
70 cfg::SharedCfg, factory, fn_service, pipeline::Pipeline, pipeline::PipelineBinding,
71 pipeline::PipelineFactory, service,
72};
73pub use ntex_error::Error;
74
75pub use ntex_util::{channel, task};
76
77pub mod codec {
78 pub use ntex_codec::*;
80}
81
82pub mod connect {
83 pub use ntex_net::connect::*;
85
86 #[cfg(feature = "openssl")]
87 pub mod openssl {
88 pub use ntex_tls::openssl::*;
90 }
91
92 #[cfg(feature = "rustls")]
93 pub mod rustls {
94 pub use ntex_tls::rustls::*;
96 }
97}
98
99pub mod router {
100 pub use ntex_router::*;
102}
103
104pub mod rt {
105 pub use ntex_rt::*;
107
108 pub use ntex_net::*;
109}
110
111pub mod service {
112 pub use ntex_service::*;
114}
115
116pub mod server {
117 pub use ntex_server::net::*;
119
120 #[cfg(feature = "openssl")]
121 pub use ntex_tls::openssl;
122
123 #[cfg(feature = "rustls")]
124 pub use ntex_tls::rustls;
125
126 pub use ntex_tls::{TlsConfig, TlsError};
127}
128
129pub mod time {
130 pub use ntex_util::time::*;
132}
133
134pub mod io {
135 pub use ntex_dispatcher::*;
137 pub use ntex_io::*;
138}
139
140pub mod testing {
141 pub use ntex_io::testing::IoTest;
143}
144
145pub mod tls {
146 pub use ntex_tls::*;
148}
149
150pub mod error {
151 pub use ntex_error::*;
153}
154
155pub mod util {
156 pub use ntex_bytes::{Buf, BufMut, ByteString, Bytes, BytesMut};
158 pub use ntex_bytes::{BytePage, BytePageSize, BytePages};
159 pub use ntex_error::{ErrorMessage, ErrorMessageChained, fmt_err, fmt_err_string};
160 pub use ntex_util::{
161 Equivalent, HashMap, HashRandomState, HashSet, clone_io_error, dyn_err, dyn_rc_err,
162 future::*, hash_map, hash_set, services::*, str_rc_err,
163 };
164
165 #[doc(hidden)]
166 pub fn enable_test_logging() {
167 #[cfg(not(feature = "no-test-logging"))]
168 if std::env::var("NTEX_NO_TEST_LOG").is_err() {
169 if std::env::var("RUST_LOG").is_err() {
170 unsafe {
171 std::env::set_var("RUST_LOG", "trace");
172 }
173 }
174 let _ = env_logger::builder().is_test(true).try_init();
175 }
176 }
177}