1#![warn(missing_docs)]
43#![warn(rustdoc::missing_crate_level_docs)]
44
45#[cfg(feature = "jwt")]
47pub mod jwt;
48
49#[cfg(feature = "cors")]
51pub mod cors;
52
53#[cfg(feature = "rate-limit")]
55pub mod rate_limit;
56
57#[cfg(feature = "config")]
59pub mod config;
60
61#[cfg(feature = "sqlx")]
63pub mod sqlx;
64
65#[cfg(feature = "diesel")]
67pub mod diesel;
68
69#[cfg(feature = "insight")]
71pub mod insight;
72
73#[cfg(feature = "timeout")]
75pub mod timeout;
76
77#[cfg(feature = "guard")]
79pub mod guard;
80
81#[cfg(feature = "logging")]
83pub mod logging;
84
85#[cfg(feature = "circuit-breaker")]
87pub mod circuit_breaker;
88
89#[cfg(feature = "retry")]
91pub mod retry;
92
93#[cfg(feature = "dedup")]
95pub mod dedup;
96
97#[cfg(feature = "sanitization")]
99pub mod sanitization;
100
101#[cfg(feature = "security-headers")]
103pub mod security_headers;
104
105#[cfg(feature = "api-key")]
107pub mod api_key;
108
109#[cfg(feature = "cache")]
111pub mod cache;
112
113#[cfg(feature = "otel")]
115pub mod otel;
116
117#[cfg(feature = "structured-logging")]
119pub mod structured_logging;
120
121#[cfg(feature = "jwt")]
123pub use jwt::{create_token, AuthUser, JwtError, JwtLayer, JwtValidation, ValidatedClaims};
124
125#[cfg(feature = "cors")]
126pub use cors::{AllowedOrigins, CorsLayer};
127
128#[cfg(feature = "rate-limit")]
129pub use rate_limit::RateLimitLayer;
130
131#[cfg(feature = "config")]
132pub use config::{
133 env_or, env_parse, load_dotenv, load_dotenv_from, require_env, try_require_env, Config,
134 ConfigError, Environment,
135};
136
137#[cfg(feature = "sqlx")]
138pub use sqlx::{convert_sqlx_error, PoolError, SqlxErrorExt, SqlxPoolBuilder, SqlxPoolConfig};
139
140#[cfg(feature = "diesel")]
141pub use diesel::{DieselPoolBuilder, DieselPoolConfig, DieselPoolError};
142
143#[cfg(feature = "insight")]
144pub use insight::{
145 InMemoryInsightStore, InsightConfig, InsightData, InsightLayer, InsightStats, InsightStore,
146};
147
148#[cfg(feature = "timeout")]
150pub use timeout::TimeoutLayer;
151
152#[cfg(feature = "guard")]
153pub use guard::{PermissionGuard, RoleGuard};
154
155#[cfg(feature = "logging")]
156pub use logging::{LogFormat, LoggingConfig, LoggingLayer};
157
158#[cfg(feature = "circuit-breaker")]
159pub use circuit_breaker::{CircuitBreakerLayer, CircuitBreakerStats, CircuitState};
160
161#[cfg(feature = "retry")]
162pub use retry::{RetryLayer, RetryStrategy};
163
164#[cfg(feature = "security-headers")]
165pub use security_headers::{HstsConfig, ReferrerPolicy, SecurityHeadersLayer, XFrameOptions};
166
167#[cfg(feature = "api-key")]
168pub use api_key::ApiKeyLayer;
169
170#[cfg(feature = "cache")]
171pub use cache::{CacheConfig, CacheLayer};
172
173#[cfg(feature = "dedup")]
174pub use dedup::{DedupConfig, DedupLayer};
175
176#[cfg(feature = "sanitization")]
177pub use sanitization::{sanitize_html, sanitize_json, strip_tags};
178
179#[cfg(feature = "otel")]
181pub use otel::{
182 extract_trace_context, inject_trace_context, propagate_trace_context, OtelConfig,
183 OtelConfigBuilder, OtelExporter, OtelLayer, TraceContext, TraceSampler,
184};
185
186#[cfg(feature = "structured-logging")]
187pub use structured_logging::{
188 DatadogFormatter, JsonFormatter, LogFormatter, LogOutputFormat, LogfmtFormatter,
189 SplunkFormatter, StructuredLoggingConfig, StructuredLoggingConfigBuilder,
190 StructuredLoggingLayer,
191};
192
193#[cfg(feature = "csrf")]
195pub mod csrf;
196
197#[cfg(feature = "csrf")]
198pub use csrf::{CsrfConfig, CsrfLayer, CsrfToken};
199
200#[cfg(feature = "oauth2-client")]
201pub mod oauth2;
202
203#[cfg(feature = "oauth2-client")]
204pub use oauth2::{
205 AuthorizationRequest, CsrfState, OAuth2Client, OAuth2Config, PkceVerifier, Provider,
206 TokenError, TokenResponse,
207};
208
209#[cfg(feature = "audit")]
210pub mod audit;
211
212#[cfg(feature = "audit")]
213pub use audit::{
214 AuditAction, AuditEvent, AuditQuery, AuditQueryBuilder, AuditSeverity, AuditStore,
215 ComplianceInfo, FileAuditStore, InMemoryAuditStore,
216};