Skip to main content

Crate actus_server

Crate actus_server 

Source
Expand description

§actus-server

The hyper-based HTTP server and longest-prefix router for Actus.

Routes are matched by longest-prefix at arbitrary depth: the framework picks the deepest controller-bearing prefix in the route tree, then hands the remaining path segment (the “action”) to that controller’s dispatcher.

Re-exports§

pub use compression::CompressionLayer;
pub use cors::CorsLayer;
pub use error::ServerError;
pub use middleware::Middleware;
pub use middleware::MiddlewareChain;
pub use middleware::Outcome;
pub use middleware::RequestLogger;
pub use request::Request;
pub use router::RateLimitClass;
pub use router::Router;
pub use router::RouterBuilder;
pub use server::DEFAULT_MAX_BODY_BYTES;
pub use server::GIB;
pub use server::KIB;
pub use server::MIB;
pub use server::Server;
pub use websocket::WebSocket;

Modules§

compression
Response compression (gzip / brotli). Behind the compression feature.
cors
Cross-Origin Resource Sharing (CORS).
error
ServerError — the error type returned by the server’s lifecycle methods (run, run_with_shutdown_on).
middleware
Middleware for Actus.
openapi
OpenAPI 3.1 doc generation. Behind the openapi feature.
request
Request — the incoming HTTP request as seen by middleware, and the body-limiting / parameter-extraction that turns it into a handler’s Params.
router
Router and RouterBuilder — the longest-prefix route tree that maps a request path to the controller mounted at its deepest matching prefix.
server
Server — the hyper-based HTTP server that owns the request lifecycle: routing, body limiting, the middleware chain, CORS, compression, and the HTTP-correctness stamping (Allow, Vary), with graceful shutdown.
websocket
WebSocket support (RFC 6455). Behind the websocket feature.

Enums§

Message
Re-export of tungstenite’s message type — text / binary / ping / pong / close frames. An enum representing the various forms of a WebSocket message.