Skip to main content

actus_server/
lib.rs

1//! # actus-server
2//!
3//! The hyper-based HTTP server and longest-prefix router for Actus.
4//!
5//! Routes are matched by longest-prefix at arbitrary depth: the framework picks
6//! the deepest controller-bearing prefix in the route tree, then hands the
7//! remaining path segment (the "action") to that controller's dispatcher.
8#![warn(missing_docs)]
9
10#[cfg(feature = "compression")]
11pub mod compression;
12pub mod cors;
13pub mod error;
14pub mod host;
15pub mod middleware;
16#[cfg(feature = "openapi")]
17pub mod openapi;
18pub mod request;
19pub mod router;
20pub mod server;
21#[cfg(feature = "websocket")]
22pub mod websocket;
23
24#[cfg(feature = "compression")]
25pub use compression::CompressionLayer;
26pub use cors::CorsLayer;
27pub use error::ServerError;
28pub use host::HostAliasError;
29pub use middleware::{Middleware, MiddlewareChain, Outcome, RequestLogger};
30pub use request::Request;
31pub use router::{Mount, RateLimitClass, Router, RouterBuilder};
32pub use server::{DEFAULT_MAX_BODY_BYTES, GIB, KIB, MIB, Server};
33#[cfg(feature = "websocket")]
34pub use websocket::{Message, WebSocket};