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