1#![forbid(unsafe_code)]
27#![allow(clippy::uninlined_format_args)]
29#![allow(clippy::single_char_pattern)]
30#![allow(clippy::unused_async)]
31#![allow(clippy::cast_possible_truncation)]
32#![allow(clippy::unreadable_literal)]
33#![allow(clippy::type_complexity)]
34#![allow(clippy::must_use_candidate)]
35#![allow(clippy::derivable_impls)]
36#![allow(clippy::missing_fields_in_debug)]
37#![allow(clippy::single_match)]
38#![allow(clippy::unused_self)]
39#![allow(clippy::redundant_closure)]
40#![allow(clippy::semicolon_if_nothing_returned)]
41#![allow(clippy::never_loop)]
42#![allow(clippy::needless_lifetimes)]
43#![allow(clippy::needless_pass_by_value)]
44#![allow(clippy::needless_borrow)]
45#![allow(clippy::match_same_arms)]
46#![allow(clippy::items_after_statements)]
47#![allow(clippy::manual_strip)]
48#![allow(clippy::format_push_string)]
49#![allow(clippy::struct_field_names)]
50#![allow(clippy::single_match_else)]
51#![allow(clippy::elidable_lifetime_names)]
52#![allow(clippy::map_unwrap_or)]
53
54pub mod app;
55mod context;
56pub mod coverage;
57mod dependency;
58pub mod digest;
59pub mod docs;
60pub mod error;
61mod extract;
62pub mod logging;
63pub mod middleware;
64pub mod multipart;
65mod password;
66mod request;
67mod response;
68pub mod routing;
69pub mod shutdown;
70pub mod testing;
71pub mod validation;
72pub mod websocket;
73
74pub use context::{CancelledError, IntoOutcome, RequestContext};
75pub use dependency::{
76 DefaultConfig, DefaultDependencyConfig, DependencyCache, DependencyOverrides, DependencyScope,
77 Depends, DependsCleanup, DependsConfig, FromDependency, FromDependencyWithCleanup, NoCache,
78};
79pub use digest::{DigestAlgorithm, DigestAuth, DigestAuthError, DigestAuthErrorKind, DigestQop};
80pub use error::{HttpError, LocItem, ValidationError, ValidationErrors};
81pub use extract::{
82 Accept, ApiKey, ApiKeyConfig, ApiKeyError, ApiKeyErrorKind, ApiKeyLocation, AppState,
83 Authorization, BasicAuth, BasicAuthError, BasicAuthErrorKind, BearerToken, BearerTokenError,
84 BearerTokenErrorKind, ContentType, Cookie, CookieExtractError, CookieExtractErrorKind,
85 CookieName, CsrfToken, CsrfTokenCookie, DEFAULT_JSON_LIMIT, DEFAULT_PAGE, DEFAULT_PER_PAGE,
86 Form, FormExtractError, FormExtractErrorKind, FromHeaderValue, FromRequest, Header,
87 HeaderExtractError, HeaderName, HeaderValues, Host, Json, JsonConfig, JsonExtractError,
88 MAX_PER_PAGE, MultipartExtractError, NamedHeader, OAuth2BearerError, OAuth2BearerErrorKind,
89 OAuth2PasswordBearer, OAuth2PasswordBearerConfig, Page, Pagination, PaginationConfig, Path,
90 PathExtractError, PathParams, Query, QueryExtractError, QueryParams, SessionId, State,
91 StateExtractError, UserAgent, Valid, ValidExtractError, Validate, XRequestId,
92 snake_to_header_case,
93};
94pub use middleware::{
95 AddResponseHeader, BoxFuture, ControlFlow, Cors, CorsConfig, Handler, Layer, Layered,
96 Middleware, MiddlewareStack, NoopMiddleware, OriginPattern, PathPrefixFilter, ReferrerPolicy,
97 RequestId, RequestIdConfig, RequestIdMiddleware, RequestResponseLogger, RequireHeader,
98 SecurityHeaders, SecurityHeadersConfig, XFrameOptions,
99};
100pub use multipart::{
101 DEFAULT_MAX_FIELDS, DEFAULT_MAX_FILE_SIZE, DEFAULT_MAX_TOTAL_SIZE, MultipartConfig,
102 MultipartError, MultipartForm, MultipartParser, Part, UploadFile, parse_boundary,
103};
104pub use request::{
105 BackgroundTasks, BackgroundTasksInner, Body, Headers, HttpVersion, Method, Request,
106 RequestBodyStream, RequestBodyStreamError,
107};
108pub use response::{
109 Binary, BodyStream, FileResponse, Html, IntoResponse, Link, LinkHeader, LinkRel, NoContent,
110 Redirect, Response, ResponseBody, ResponseModelAliases, ResponseModelConfig, ResponseProduces,
111 SameSite, SetCookie, StatusCode, Text, ValidatedResponse, apply_conditional, check_if_match,
112 check_if_none_match, exclude_fields, include_fields, mime_type_for_extension,
113};
114pub use websocket::{
115 Frame as WebSocketFrame, OpCode as WebSocketOpCode, WS_GUID, WebSocket, WebSocketError,
116 WebSocketHandshakeError, websocket_accept_from_key,
117};
118
119pub use docs::{
121 DocsConfig, oauth2_redirect_html, oauth2_redirect_response, redoc_html, redoc_response,
122 swagger_ui_html, swagger_ui_response,
123};
124
125pub use asupersync::{Budget, Cx, Outcome, RegionId, TaskId};
127
128pub use password::{Algorithm, HashConfig, PasswordHasher, SecureCompare, constant_time_eq};
130
131pub use testing::{
133 CookieJar, FixtureGuard, IntegrationTest, RequestBuilder, TestClient, TestFixture,
134 TestResponse, json_contains,
135};
136
137pub use logging::{AutoSpan, LogConfig, LogEntry, LogLevel, Span};
144
145pub use app::{
147 App, AppBuilder, AppConfig, ExceptionHandlers, OpenApiConfig, RouteEntry, StartupHook,
148 StartupHookError, StartupOutcome, StateContainer,
149};
150
151pub use shutdown::{
153 GracefulConfig, GracefulShutdown, InFlightGuard, ShutdownAware, ShutdownController,
154 ShutdownHook, ShutdownOutcome, ShutdownPhase, ShutdownReceiver, grace_expired_cancel_reason,
155 shutdown_cancel_reason, subdivide_grace_budget,
156};