1#![warn(missing_docs)]
28#![warn(rustdoc::missing_crate_level_docs)]
29
30#[cfg(feature = "jwt")]
32pub mod jwt;
33
34#[cfg(feature = "cors")]
36pub mod cors;
37
38#[cfg(feature = "rate-limit")]
40pub mod rate_limit;
41
42#[cfg(feature = "config")]
44pub mod config;
45
46#[cfg(feature = "sqlx")]
48pub mod sqlx;
49
50#[cfg(feature = "diesel")]
52pub mod diesel;
53
54#[cfg(feature = "insight")]
56pub mod insight;
57
58#[cfg(feature = "timeout")]
60pub mod timeout;
61
62#[cfg(feature = "guard")]
64pub mod guard;
65
66#[cfg(feature = "logging")]
68pub mod logging;
69
70#[cfg(feature = "circuit-breaker")]
72pub mod circuit_breaker;
73
74#[cfg(feature = "retry")]
76pub mod retry;
77
78#[cfg(feature = "dedup")]
80pub mod dedup;
81
82#[cfg(feature = "sanitization")]
84pub mod sanitization;
85
86#[cfg(feature = "security-headers")]
88pub mod security_headers;
89
90#[cfg(feature = "api-key")]
92pub mod api_key;
93
94#[cfg(feature = "cache")]
96pub mod cache;
97
98#[cfg(feature = "otel")]
100pub mod otel;
101
102#[cfg(feature = "structured-logging")]
104pub mod structured_logging;
105
106#[cfg(feature = "jwt")]
108pub use jwt::{create_token, AuthUser, JwtError, JwtLayer, JwtValidation, ValidatedClaims};
109
110#[cfg(feature = "cors")]
111pub use cors::{AllowedOrigins, CorsLayer};
112
113#[cfg(feature = "rate-limit")]
114pub use rate_limit::RateLimitLayer;
115
116#[cfg(feature = "config")]
117pub use config::{
118 env_or, env_parse, load_dotenv, load_dotenv_from, require_env, try_require_env, Config,
119 ConfigError, Environment,
120};
121
122#[cfg(feature = "sqlx")]
123pub use sqlx::{convert_sqlx_error, PoolError, SqlxErrorExt, SqlxPoolBuilder, SqlxPoolConfig};
124
125#[cfg(feature = "diesel")]
126pub use diesel::{DieselPoolBuilder, DieselPoolConfig, DieselPoolError};
127
128#[cfg(feature = "insight")]
129pub use insight::{
130 InMemoryInsightStore, InsightConfig, InsightData, InsightLayer, InsightStats, InsightStore,
131};
132
133#[cfg(feature = "timeout")]
135pub use timeout::TimeoutLayer;
136
137#[cfg(feature = "guard")]
138pub use guard::{PermissionGuard, RoleGuard};
139
140#[cfg(feature = "logging")]
141pub use logging::{LogFormat, LoggingConfig, LoggingLayer};
142
143#[cfg(feature = "circuit-breaker")]
144pub use circuit_breaker::{CircuitBreakerLayer, CircuitBreakerStats, CircuitState};
145
146#[cfg(feature = "retry")]
147pub use retry::{RetryLayer, RetryStrategy};
148
149#[cfg(feature = "security-headers")]
150pub use security_headers::{HstsConfig, ReferrerPolicy, SecurityHeadersLayer, XFrameOptions};
151
152#[cfg(feature = "api-key")]
153pub use api_key::ApiKeyLayer;
154
155#[cfg(feature = "cache")]
156pub use cache::{CacheConfig, CacheLayer};
157
158#[cfg(feature = "dedup")]
159pub use dedup::{DedupConfig, DedupLayer};
160
161#[cfg(feature = "sanitization")]
162pub use sanitization::{sanitize_html, sanitize_json, strip_tags};
163
164#[cfg(feature = "otel")]
166pub use otel::{
167 extract_trace_context, inject_trace_context, propagate_trace_context, OtelConfig,
168 OtelConfigBuilder, OtelExporter, OtelLayer, TraceContext, TraceSampler,
169};
170
171#[cfg(feature = "structured-logging")]
172pub use structured_logging::{
173 DatadogFormatter, JsonFormatter, LogFormatter, LogOutputFormat, LogfmtFormatter,
174 SplunkFormatter, StructuredLoggingConfig, StructuredLoggingConfigBuilder,
175 StructuredLoggingLayer,
176};
177
178#[cfg(feature = "csrf")]
180pub mod csrf;
181
182#[cfg(feature = "csrf")]
183pub use csrf::{CsrfConfig, CsrfLayer, CsrfToken};
184
185#[cfg(feature = "oauth2-client")]
186pub mod oauth2;
187
188#[cfg(feature = "oauth2-client")]
189pub use oauth2::{
190 AuthorizationRequest, CsrfState, OAuth2Client, OAuth2Config, PkceVerifier, Provider,
191 TokenError, TokenResponse,
192};
193
194#[cfg(feature = "audit")]
195pub mod audit;
196
197#[cfg(feature = "audit")]
198pub use audit::{
199 AuditAction, AuditEvent, AuditQuery, AuditQueryBuilder, AuditSeverity, AuditStore,
200 ComplianceInfo, FileAuditStore, InMemoryAuditStore,
201};