Skip to main content

Module app

Module app 

Source
Expand description

App (spec §4.1): assembles mounted modules + app-level routes, validates the route table at build time (fail loud), and dispatches requests.

Structs§

App
The application builder. Generated app/src/main.rs is exactly this: provide app-level deps, mount modules, serve.
BuiltApp
The frozen, immutable runtime form. Cheap to share across connections.

Traits§

Extension
Spec §6: capabilities register through one seam. An extension receives the builder and returns it — providers, routes, middleware, anything.

Type Aliases§

ErrorBodyMapper
An app-level error-body mapper (App::map_error_body). Given a framework-emitted error’s status, stable code, and message, it returns Some(body) to reshape the JSON response into the app’s own wire envelope, or None to keep jerrycan’s default {code, message[, details]} body (so a mapper that only remaps some errors leaves the rest — and their details — untouched). Applied to EVERY error response (framework guards/extractors AND handler-returned Error) at the single dispatch exit.