Skip to main content

mucosal_delegate

Attribute Macro mucosal_delegate 

Source
#[mucosal_delegate]
Expand description

Declare boundary discipline is delegated to a named handler (ADR-027 + Amendment 1).

#[mucosal_delegate(boundary = MucosalKind::X, handled_by = path::to::fn, rationale = "...")] declares that the boundary defense is performed by a callee. Per ADR-027 Amendment 1 Change 4 handled_by is a path expression (not a string) so typos fail at parse-time. Per Change 5 the handler MUST carry a matching #[mucosal(kind = X)] — enforced at audit-time via the three-tier diagnosis.

§Arguments

  • boundary = MucosalKind::X (required) — the delegated boundary kind
  • handled_by = <path> (required) — path to the handler function
  • rationale = "..." (required, ≥20 chars)

§Audit hints (three-tier diagnosis per Change 5)

  • mucosal-discipline-delegate-target-missing — handler path doesn’t resolve
  • mucosal-discipline-delegate-target-not-mucosal — handler has no #[mucosal]
  • mucosal-discipline-delegate-target-kind-mismatch — handler’s #[mucosal(kind)] set doesn’t include boundary