Expand description
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.
Structs§
- Server
- The main Actus server.
Constants§
- DEFAULT_
DRAIN_ DEADLINE - Default grace period for in-flight connections to finish after a
shutdown signal: 30 seconds. Override with
Server::with_drain_deadline. - DEFAULT_
MAX_ BODY_ BYTES - Default cap on the request body Actus will buffer: 2 MiB — a safe
ceiling for the common case (JSON APIs, forms). Endpoints that accept larger
bodies (uploads) opt in via
Server::with_max_body_bytesor a per-controller#[controller(max_body_bytes = …)]. Matches axum’s default. - GIB
- One gibibyte (1024 × 1024 × 1024 bytes).
- KIB
- One kibibyte (1024 bytes). For readable byte-size limits, e.g.
#[controller(max_body_bytes = 4 * KIB)]. - MIB
- One mebibyte (1024 × 1024 bytes), e.g.
Server::with_max_body_bytes(2 * MIB).