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 pagination;
109pub mod proxy;
110pub mod rewrite;
111pub mod scheduler;
112pub mod tcp_proxy;
113pub mod udp_proxy;
114pub mod ws_proxy;
115pub mod canary;
116pub mod circuit_breaker;
117pub mod service_discovery;
118pub mod config_binding;
119pub mod di;
120pub mod proxy_config;
121pub mod ingress;
122#[cfg(feature = "tera")]
123pub mod template;
124pub mod validate;
125pub mod virtual_host;
126#[cfg(any(feature = "model-sqlite", feature = "model-postgres", feature = "model-mysql"))]
127pub mod model;
128pub mod websocket;
129pub mod http_client;
130#[cfg(feature = "crypto")]
131pub mod crypto;
132#[cfg(feature = "csrf")]
133pub mod csrf;
134#[cfg(feature = "sso")]
135pub mod sso;
136#[cfg(feature = "mailer")]
137pub mod mailer;
138#[cfg(feature = "jobs")]
139pub mod jobs;
140#[cfg(any(feature = "storage-local", feature = "storage-s3", feature = "storage-azure"))]
141pub mod storage;
142#[cfg(feature = "openapi")]
143pub mod openapi;
144#[cfg(feature = "webhook")]
145pub mod webhook;
146pub mod timeout;
147pub mod prelude;
148
149#[cfg(feature = "http2")]
150#[doc(hidden)]
151pub mod tls;
152
153#[cfg(feature = "http2")]
154#[doc(hidden)]
155pub mod h2_handler;
156
157#[cfg(feature = "http3")]
158#[doc(hidden)]
159pub mod h3_handler;
160
161#[cfg(test)]
168pub mod test_env {
169 use std::sync::{Mutex, OnceLock};
170 static LOCK: OnceLock<Mutex<()>> = OnceLock::new();
171 pub fn lock() -> std::sync::MutexGuard<'static, ()> {
172 LOCK.get_or_init(|| Mutex::new(()))
173 .lock()
174 .unwrap_or_else(|e| e.into_inner())
175 }
176}