1extern crate self as rust_web_server;
49
50pub mod app;
51#[cfg(feature = "auth")]
52pub mod auth;
53
54#[cfg(feature = "macros")]
55pub use rws_macros::{delete, get, patch, post, put, route, Config, FromRequest, Validate};
56#[cfg(all(feature = "macros", any(feature = "model-sqlite", feature = "model-postgres", feature = "model-mysql")))]
57pub use rws_macros::Model;
58#[cfg(feature = "http2")]
59pub mod async_state;
60pub mod session;
61pub mod sse;
62pub mod compression;
63pub mod cookie;
64pub mod error;
65pub mod extract;
66pub mod ip_filter;
67pub mod macros;
68pub mod blocklist;
69pub mod cache;
70pub mod config_reload;
71pub mod server_config;
72pub mod feature;
73pub mod maintenance;
74pub mod metrics;
75pub mod mcp;
76pub mod request_log;
77pub mod request_id;
78pub mod otel;
79#[cfg(feature = "acme")]
80pub mod acme;
81pub mod middleware;
82pub mod rate_limit;
83pub mod router;
84pub mod state;
85pub mod test_client;
86pub mod application;
87pub mod body;
88pub mod client_hint;
89pub mod controller;
90pub mod core;
91pub mod cors;
92pub mod entry_point;
93pub mod ext;
94pub mod header;
95pub mod http;
96pub mod json;
97pub mod language;
98pub mod log;
99pub mod mime_type;
100pub mod null;
101pub mod range;
102pub mod request;
103pub mod response;
104pub mod server;
105pub mod symbol;
106pub mod thread_pool;
107pub mod url;
108pub mod proxy;
109pub mod rewrite;
110pub mod scheduler;
111pub mod tcp_proxy;
112pub mod udp_proxy;
113pub mod ws_proxy;
114pub mod canary;
115pub mod circuit_breaker;
116pub mod service_discovery;
117pub mod config_binding;
118pub mod di;
119pub mod proxy_config;
120pub mod ingress;
121#[cfg(feature = "tera")]
122pub mod template;
123pub mod validate;
124pub mod virtual_host;
125#[cfg(any(feature = "model-sqlite", feature = "model-postgres", feature = "model-mysql"))]
126pub mod model;
127pub mod websocket;
128pub mod http_client;
129#[cfg(feature = "crypto")]
130pub mod crypto;
131#[cfg(feature = "csrf")]
132pub mod csrf;
133#[cfg(feature = "sso")]
134pub mod sso;
135#[cfg(feature = "mailer")]
136pub mod mailer;
137#[cfg(feature = "jobs")]
138pub mod jobs;
139#[cfg(any(feature = "storage-local", feature = "storage-s3"))]
140pub mod storage;
141#[cfg(feature = "openapi")]
142pub mod openapi;
143pub mod timeout;
144pub mod prelude;
145
146#[cfg(feature = "http2")]
147#[doc(hidden)]
148pub mod tls;
149
150#[cfg(feature = "http2")]
151#[doc(hidden)]
152pub mod h2_handler;
153
154#[cfg(feature = "http3")]
155#[doc(hidden)]
156pub mod h3_handler;
157
158#[cfg(test)]
165pub mod test_env {
166 use std::sync::{Mutex, OnceLock};
167 static LOCK: OnceLock<Mutex<()>> = OnceLock::new();
168 pub fn lock() -> std::sync::MutexGuard<'static, ()> {
169 LOCK.get_or_init(|| Mutex::new(()))
170 .lock()
171 .unwrap_or_else(|e| e.into_inner())
172 }
173}