Skip to main content

rustlavel_http/
lib.rs

1//! rustlavel-http: the HTTP layer, written from scratch on Tokio's TCP.
2//!
3//! Parsing, routing, the middleware pipeline, request and response types, the
4//! development error page, and a test client that dispatches without a socket.
5
6pub mod body_limit;
7pub mod compression;
8pub mod cookie;
9pub mod cors;
10pub mod date;
11pub mod error_page;
12pub mod etag;
13pub mod files;
14pub mod flash;
15pub mod handler;
16pub mod health;
17pub mod headers;
18pub mod json_resource;
19pub mod method;
20pub mod middleware;
21pub mod panic;
22pub mod plugin;
23pub mod request;
24pub mod request_id;
25pub mod response;
26pub mod router;
27pub mod server;
28pub mod sse;
29pub mod status;
30pub mod testing;
31pub mod timeout;
32pub mod trusted_proxies;
33pub mod upgrade;
34pub mod url;
35pub mod versioning;
36
37pub use body_limit::BodyLimit;
38pub use compression::Compress;
39pub use cookie::{Cookie, SameSite};
40pub use cors::Cors;
41pub use etag::ETag;
42pub use files::Files;
43pub use flash::Flash;
44// `BoxFuture` is the return type of `Middleware::handle`, so it has to be
45// nameable outside this crate — a middleware written in an application cannot
46// spell its own signature otherwise.
47pub use handler::{BoxFuture, Handler};
48pub use health::Health;
49pub use headers::Headers;
50pub use json_resource::{Attributes, JsonResource, ResourceResponse, attributes};
51pub use method::Method;
52pub use middleware::{Middleware, Next};
53pub use plugin::{Plugin, Setup};
54pub use request::Request;
55pub use request_id::RequestId;
56pub use response::{IntoResponse, Response};
57pub use router::{NamedRoutes, Resource, Route, RouteHandle, Router};
58pub use server::{Limits, OnShutdown, Server};
59pub use sse::Event as SseEvent;
60pub use status::Status;
61pub use testing::{TestClient, TestResponse};
62pub use timeout::Timeout;
63pub use trusted_proxies::{Forwarded, TrustProxies};
64pub use upgrade::{Upgrade, Upgraded};
65pub use versioning::{ApiVersion, VersionHeader};