hyper_simple_server/
lib.rs1
2
3#![ no_implicit_prelude ]
4
5
6
7
8#![ allow (warnings) ]
9#![ cfg_attr (feature = "features-fuzzing", deny (warnings)) ]
10
11
12#![ warn (absolute_paths_not_starting_with_crate) ]
13#![ warn (anonymous_parameters) ]
14#![ warn (elided_lifetimes_in_paths) ]
15#![ warn (explicit_outlives_requirements) ]
16#![ warn (invalid_html_tags) ]
17#![ warn (keyword_idents) ]
18#![ warn (macro_use_extern_crate) ]
19#![ warn (meta_variable_misuse) ]
20#![ warn (non_ascii_idents) ]
24#![ warn (pointer_structural_match) ]
25#![ warn (private_doc_tests) ]
26#![ warn (single_use_lifetimes) ]
27#![ warn (trivial_casts) ]
28#![ warn (trivial_numeric_casts) ]
29#![ warn (unsafe_code) ]
31#![ warn (unused_crate_dependencies) ]
32#![ warn (unused_extern_crates) ]
33#![ warn (unused_import_braces) ]
34#![ warn (unused_lifetimes) ]
35#![ warn (unused_qualifications) ]
36#![ warn (variant_size_differences) ]
37
38#![ allow (box_pointers) ]
39#![ allow (missing_copy_implementations) ]
40#![ allow (missing_debug_implementations) ]
41#![ allow (unused_results) ]
42
43
44#![ warn (clippy::all) ]
45#![ warn (clippy::correctness) ]
46#![ warn (clippy::style) ]
47#![ warn (clippy::complexity) ]
48#![ warn (clippy::perf) ]
49#![ warn (clippy::cargo) ]
50#![ allow (clippy::pedantic) ]
51#![ allow (clippy::nursery) ]
52
53#![ allow (clippy::unused_unit) ]
54#![ allow (clippy::new_without_default) ]
55
56#![ allow (clippy::cargo_common_metadata) ]
57#![ allow (clippy::wildcard_dependencies) ]
58
59
60#![ cfg_attr (not (feature = "hss-full"), allow (unused_imports)) ]
61
62
63
64
65pub use {
66 crate::accepter::*,
67 crate::cli::*,
68 crate::connection::*,
69 crate::configuration::*,
70 crate::errors::exports::*,
71 crate::extensions::*,
72 crate::resources::*,
73 crate::handler::*,
74 crate::main::*,
75 crate::routes::*,
76 crate::sanitize::*,
77 crate::server::*,
78 crate::profiling::*,
79};
80
81
82#[ cfg (feature = "hss-exports") ]
83pub use {
84 crate::exports::*,
85 crate::dependencies::*,
86};
87
88
89
90
91pub(crate) mod accepter;
92pub(crate) mod cli;
93pub(crate) mod configuration;
94pub(crate) mod connection;
95pub(crate) mod errors;
96pub(crate) mod exports;
97pub(crate) mod extensions;
98pub(crate) mod resources;
99pub(crate) mod handler;
100pub(crate) mod main;
101pub(crate) mod prelude;
102pub(crate) mod routes;
103pub(crate) mod sanitize;
104pub(crate) mod server;
105pub(crate) mod profiling;
106
107
108#[ cfg (all (feature = "hss-server-core", not (feature = "hyper--server-http"), not (feature = "features-fuzzing"))) ]
109compile_error! ("enable any of HTTP/1 or HTTP/2");
110
111
112
113
114#[ cfg (feature = "hss-jemalloc") ]
115#[global_allocator]
116static ALLOCATOR : ::jemallocator::Jemalloc = ::jemallocator::Jemalloc;
117
118
119
120
121mod dependencies {
122
123 #![ allow (unused_imports) ]
124
125 #[ cfg (feature = "hyper") ]
126 pub use ::hyper;
127
128 #[ cfg (feature = "tokio") ]
129 pub use ::tokio;
130
131 #[ cfg (feature = "http") ]
132 pub use ::http;
133
134 #[ cfg (feature = "http-body") ]
135 pub use ::http_body;
136
137 #[ cfg (feature = "bytes") ]
138 pub use ::bytes;
139
140
141 #[ cfg (feature = "rustls") ]
142 pub use ::rustls;
143
144 #[ cfg (feature = "tokio-rustls") ]
145 pub use ::tokio_rustls;
146
147 #[ cfg (feature = "rustls-pemfile") ]
148 pub use ::rustls_pemfile;
149
150
151 #[ cfg (feature = "native-tls") ]
152 pub use ::native_tls;
153
154 #[ cfg (feature = "tokio-native-tls") ]
155 pub use ::tokio_native_tls;
156
157
158 #[ cfg (feature = "futures") ]
159 pub use ::futures;
160
161 #[ cfg (feature = "path-tree") ]
162 pub use ::path_tree;
163
164 #[ cfg (feature = "argparse") ]
165 pub use ::argparse;
166
167 #[ cfg (feature = "cpuprofiler") ]
168 pub use ::cpuprofiler;
169
170 #[ cfg (feature = "jemallocator") ]
171 pub use ::jemallocator;
172
173 #[ cfg (feature = "jemalloc-sys") ]
174 pub use ::jemalloc_sys;
175}
176