Expand description
Trust-Task primitive — every wire op in the workspace binds to a
versioned Trust Task identifier published on
trusttasks.org. See spec §3-L and §16 of
docs/05-design-notes/vtc-mvp.md for the full design rationale.
This module ships the workspace-wide foundation:
TrustTask— a validated newtype around the Trust-Task identifier (a URL the workspace treats as opaque).HEADER_NAME— the canonical HTTP header name (Trust-Task).extractor::TrustTaskHeader— Axum extractor for handlers that want to read the header value directly.router::TrustTaskRouter— builder that wraps AxumRouterand enforces exact-match Trust-Task header validation at route attach time (no string-prefix tricks, no version-family matching — see spec §9.4).
§Design call
The router builder is explicit and macro-free per the M0.1.1 plan
decision D9. A future-reader sees the registered task right
next to the handler in source, and cargo doc surfaces it on the
route without any procedural-macro indirection.
Re-exports§
pub use extractor::TrustTaskHeader;pub use router::TrustTaskRouter;
Modules§
- extractor
- Axum extractor + middleware function for the
Trust-Taskheader. - router
TrustTaskRouter— AxumRouterbuilder that enforces per-route Trust-Task header validation at attach time.
Structs§
- Trust
Task - A validated Trust-Task identifier.
Constants§
- HEADER_
NAME - Canonical HTTP header name carrying the Trust-Task identifier on REST requests. The workspace pins this literal so a future audit can grep for header consumers without ambiguity.