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