1mod app;
54mod auto_route;
55pub use auto_route::collect_auto_routes;
56mod auto_schema;
57pub use auto_schema::apply_auto_schemas;
58#[cfg(feature = "dashboard")]
59pub mod dashboard;
60mod error;
61pub mod events;
62mod extract;
63mod handler;
64pub mod hateoas;
65pub mod health;
66#[cfg(feature = "http3")]
67pub mod http3;
68pub mod interceptor;
69pub(crate) mod json;
70pub mod middleware;
71pub mod multipart;
72pub(crate) mod path_params;
73pub(crate) mod path_validation;
74#[cfg(feature = "replay")]
75pub mod replay;
76mod request;
77mod response;
78mod router;
79mod server;
80pub mod sse;
81pub mod static_files;
82pub mod status;
83pub mod stream;
84pub mod typed_path;
85pub mod validation;
86#[macro_use]
87mod tracing_macros;
88
89#[doc(hidden)]
94pub mod __private {
95 pub use crate::auto_route::AUTO_ROUTES;
96 pub use crate::auto_schema::AUTO_SCHEMAS;
97 pub use linkme;
98 pub use rustapi_openapi;
99 pub use rustapi_validate;
100}
101
102pub use app::{ProductionDefaultsConfig, RustApi, RustApiConfig};
104#[cfg(feature = "dashboard")]
105pub use dashboard::{DashboardConfig, DashboardMetrics, DashboardSnapshot};
106pub use error::{get_environment, ApiError, Environment, FieldError, Result};
107pub use events::EventBus;
108#[cfg(feature = "cookies")]
109pub use extract::Cookies;
110pub use extract::{
111 AsyncValidatedJson, Body, BodyStream, ClientIp, CursorPaginate, Extension, FromRequest,
112 FromRequestParts, HeaderValue, Headers, Json, Paginate, Path, Query, State, Typed,
113 ValidatedJson,
114};
115pub use handler::{
116 delete_route, get_route, patch_route, post_route, put_route, Handler, HandlerService, Route,
117 RouteHandler,
118};
119pub use hateoas::{
120 CursorPaginated, Link, LinkOrArray, Linkable, PageInfo, Paginated, Resource, ResourceCollection,
121};
122pub use health::{
123 HealthCheck, HealthCheckBuilder, HealthCheckResult, HealthEndpointConfig, HealthResponse,
124 HealthStatus,
125};
126pub use http::StatusCode;
127#[cfg(feature = "http3")]
128pub use http3::{Http3Config, Http3Server};
129pub use interceptor::{InterceptorChain, RequestInterceptor, ResponseInterceptor};
130#[cfg(feature = "compression")]
131pub use middleware::CompressionLayer;
132pub use middleware::{BodyLimitLayer, RequestId, RequestIdLayer, TracingLayer, DEFAULT_BODY_LIMIT};
133#[cfg(feature = "metrics")]
134pub use middleware::{MetricsLayer, MetricsResponse};
135pub use multipart::{
136 Multipart, MultipartConfig, MultipartField, StreamingMultipart, StreamingMultipartField,
137 UploadedFile,
138};
139pub use path_params::PathParams;
140pub use request::{BodyVariant, Request};
141pub use response::{
142 Body as ResponseBody, Created, Html, IntoResponse, NoContent, Redirect, Response, WithStatus,
143};
144pub use router::{delete, get, patch, post, put, MethodRouter, RouteMatch, Router};
145pub use sse::{sse_from_iter, sse_response, KeepAlive, Sse, SseEvent};
146pub use static_files::{serve_dir, StaticFile, StaticFileConfig};
147pub use stream::{StreamBody, StreamingBody, StreamingConfig};
148pub use typed_path::TypedPath;
149pub use validation::Validatable;