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 middleware;
15#[cfg(feature = "openapi")]
16pub mod openapi;
17pub mod request;
18pub mod router;
19pub mod server;
20#[cfg(feature = "websocket")]
21pub mod websocket;
22
23#[cfg(feature = "compression")]
24pub use compression::CompressionLayer;
25pub use cors::CorsLayer;
26pub use error::ServerError;
27pub use middleware::{Middleware, MiddlewareChain, Outcome, RequestLogger};
28pub use request::Request;
29pub use router::{RateLimitClass, Router, RouterBuilder};
30pub use server::{DEFAULT_MAX_BODY_BYTES, GIB, KIB, MIB, Server};
31#[cfg(feature = "websocket")]
32pub use websocket::{Message, WebSocket};