1mod app;
54pub mod auto_route;
55pub use auto_route::collect_auto_routes;
56pub mod 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 mod json;
67pub mod middleware;
68pub mod multipart;
69pub mod path_params;
70pub 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}
97
98pub use app::{RustApi, RustApiConfig};
100pub use error::{get_environment, ApiError, Environment, FieldError, Result};
101#[cfg(feature = "cookies")]
102pub use extract::Cookies;
103pub use extract::{
104 AsyncValidatedJson, Body, BodyStream, ClientIp, Extension, FromRequest, FromRequestParts,
105 HeaderValue, Headers, Json, Path, Query, State, Typed, ValidatedJson,
106};
107pub use handler::{
108 delete_route, get_route, patch_route, post_route, put_route, Handler, HandlerService, Route,
109 RouteHandler,
110};
111pub use hateoas::{Link, LinkOrArray, Linkable, PageInfo, Resource, ResourceCollection};
112pub use health::{HealthCheck, HealthCheckBuilder, HealthCheckResult, HealthStatus};
113pub use http::StatusCode;
114#[cfg(feature = "http3")]
115pub use http3::{Http3Config, Http3Server};
116pub use interceptor::{InterceptorChain, RequestInterceptor, ResponseInterceptor};
117#[cfg(feature = "compression")]
118pub use middleware::CompressionLayer;
119pub use middleware::{BodyLimitLayer, RequestId, RequestIdLayer, TracingLayer, DEFAULT_BODY_LIMIT};
120#[cfg(feature = "metrics")]
121pub use middleware::{MetricsLayer, MetricsResponse};
122pub use multipart::{Multipart, MultipartConfig, MultipartField, UploadedFile};
123pub use request::{BodyVariant, Request};
124pub use response::{
125 Body as ResponseBody, Created, Html, IntoResponse, NoContent, Redirect, Response, WithStatus,
126};
127pub use router::{delete, get, patch, post, put, MethodRouter, RouteMatch, Router};
128pub use sse::{sse_response, KeepAlive, Sse, SseEvent};
129pub use static_files::{serve_dir, StaticFile, StaticFileConfig};
130pub use stream::{StreamBody, StreamingBody, StreamingConfig};
131pub use typed_path::TypedPath;
132pub use validation::Validatable;