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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
//! ntex - framework for composable network services
//!
//! ## Package feature
//!
//! * `openssl` - enables ssl support via `openssl` crate
//! * `rustls` - enables ssl support via `rustls` crate
//! * `compress` - enables compression support in http and web modules
//! * `cookie` - enables cookie support in http and web modules
#![warn(
    rust_2018_idioms,
    unreachable_pub,
    // missing_debug_implementations,
    // missing_docs
)]
#![allow(
    type_alias_bounds,
    clippy::type_complexity,
    clippy::borrow_interior_mutable_const,
    clippy::needless_doctest_main,
    clippy::too_many_arguments,
    clippy::new_without_default
)]

#[cfg(not(test))] // Work around for rust-lang/rust#62127
pub use ntex_macros::{rt_main as main, rt_test as test};

#[cfg(test)]
pub(crate) use ntex_macros::rt_test2 as rt_test;

pub use ntex_service::{forward_poll_ready, forward_poll_shutdown};

pub mod http;
pub mod web;

#[cfg(feature = "ws")]
pub mod ws;

pub use self::service::{
    chain, chain_factory, fn_service, into_service, IntoService, IntoServiceFactory,
    Middleware, Pipeline, Service, ServiceCtx, ServiceFactory,
};

pub use ntex_util::{channel, task};

pub mod codec {
    //! Utilities for encoding and decoding frames.
    pub use ntex_codec::*;
}

pub mod connect {
    //! Tcp connector service
    pub use ntex_net::connect::*;

    #[cfg(feature = "openssl")]
    pub mod openssl {
        pub use ntex_tls::openssl::{SslConnector, SslFilter};

        #[doc(hidden)]
        #[deprecated]
        pub use ntex_tls::openssl::SslConnector as Connector;
    }

    #[cfg(feature = "rustls")]
    pub mod rustls {
        pub use ntex_tls::rustls::{TlsClientFilter, TlsConnector};

        #[doc(hidden)]
        #[deprecated]
        pub use ntex_tls::rustls::TlsConnector as Connector;
    }
}

pub mod router {
    //! Resource path matching library.
    pub use ntex_router::*;
}

pub mod rt {
    //! A runtime implementation that runs everything on the current thread.
    pub use ntex_rt::*;

    pub use ntex_net::*;
}

pub mod service {
    pub use ntex_service::*;
}

pub mod server {
    //! General purpose tcp server
    pub use ntex_server::net::*;

    #[cfg(feature = "openssl")]
    pub use ntex_tls::openssl;

    #[cfg(feature = "rustls")]
    pub use ntex_tls::rustls;
}

pub mod time {
    //! Utilities for tracking time.
    pub use ntex_util::time::*;
}

pub mod io {
    //! IO streaming utilities.
    pub use ntex_io::*;
}

pub mod testing {
    //! IO testing utilities.
    #[doc(hidden)]
    pub use ntex_io::testing::IoTest as Io;
    pub use ntex_io::testing::IoTest;
}

pub mod tls {
    //! TLS support for ntex ecosystem.
    pub use ntex_tls::*;
}

pub mod util {
    pub use ntex_bytes::{
        Buf, BufMut, ByteString, Bytes, BytesMut, BytesVec, Pool, PoolId, PoolRef,
    };
    pub use ntex_util::{future::*, ready, services::*, HashMap, HashSet};
}