Skip to main content

Module authz

Module authz 

Source
Expand description

Authorization phantom-typed Effect (A8 + A19).

Effect<'i, S: AuthState> carries:

  • S — authorization state at the type level (Unverified or Authorized).
  • 'i — invariant-lifetime brand (GhostCell pattern, A19) preventing cross-instance reuse of authorized effects.

authorize() is the sole constructor for Effect<'i, Authorized> — external code cannot fabricate an Authorized value because the struct fields are pub(crate) and the path through authorize() is the only audited gate.

Structs§

Effect
Phantom-typed Effect — carries Op payload + Principal origin tag.

Enums§

Authorized
Uninhabited tag — Effect has been validated by authorize().
DenyReason
Reason an effect was denied during authorization.
Unverified
Uninhabited tag — Effect has not been authorized.

Traits§

AuthState
Sealed marker — only Unverified and Authorized may implement.