pub enum Role {
Show 18 variants
CapturedDeclaration,
Plan,
OriginNode,
GeneratedUnit,
RenderedUnit,
OutputBytes,
Bundle,
Closure,
ClosedExpansion,
ProjectionIntent,
Explanation,
DeclarationDocumentation,
DeclaredName,
GeneratorVersion,
DiagnosticRelation,
CapturedHelper,
ProjectionContent,
ProjectionKind,
}Expand description
The seat one identity stands in inside its grammar.
A role is part of the derive-key context AND a member of every transcript, so two identities derived from one anchor under different roles are different twice over: separated before a byte of the transcript is read, and disagreeing inside it.
A row’s declared name and slot are what the bytes carry, so a row is APPENDED and never renumbered — renumbering an occupied slot re-encodes transcripts that were already encoded.
Variants§
CapturedDeclaration
The token material one expansion was handed.
Plan
One projection plan.
OriginNode
One node of the origin graph.
GeneratedUnit
One generated unit a plan declares it will materialize.
RenderedUnit
One rendered unit a renderer actually materialized.
OutputBytes
The canonical bytes of one rendered unit.
Bundle
One bundle materialized across a single publication boundary.
Closure
One proved closure between a plan and its rendering.
ClosedExpansion
One closed expansion.
ProjectionIntent
One projection intent — what a request meant, ahead of what it decided.
Explanation
One explanation, answered over a plan and its closure.
DeclarationDocumentation
The documentation rows one captured declaration carries, read as a second fact over the surface its semantic commitment already names.
DeclaredName
One stable name this compiler wrote down.
GeneratorVersion
The generator’s declared name and the shape it renders.
DiagnosticRelation
One refusal body, or one issue inside it, as a diagnostic points at it.
CapturedHelper
One helper attribute’s material, read as an independent fact over the surface its semantic commitment already names.
Several helpers may stand here at once; they are separated by the roster position each one is derived at, never by a grammar of their own.
ProjectionContent
One kind-specific content commitment.
ProjectionKind
One projection kind qualified by the producer that owns its generated names.
Implementations§
Source§impl Role
impl Role
Sourcepub const fn name(self) -> &'static str
pub const fn name(self) -> &'static str
The role’s declared segment of the derive-key context.
Declared rather than taken from the Rust spelling, for the reason a subject’s name is: changing one of these literals renames every identity ever derived at that seat.
Sourcepub const fn slot(self) -> u8
pub const fn slot(self) -> u8
The published byte member six of every transcript carries for this role.
Sourcepub const fn described(self) -> &'static str
pub const fn described(self) -> &'static str
The seat rendered for a person. A projection: nothing reads it back.
Sourcepub const fn profile(self) -> Profile
pub const fn profile(self) -> Profile
The preimage grammar a transcript at this role stands in.
Total, and the ONE road from a mint site to a version ladder: a call site names the seat it is deriving for, and the grammar follows rather than being passed alongside it. A road that took both would admit a rendered unit derived under the plan grammar’s position, which is a disagreement no reader of the resulting bytes could see.
§Bounds
Total and never injective.
Two seats standing over ONE grammar answer with one profile and are separated inside it by the role, which is a member of the transcript and a segment of the context: Role::RenderedUnit names a rendered unit and Role::OutputBytes names the digest of exactly that unit’s bytes, so both read here to RENDERED_UNIT_PROFILE.
Nothing reads back: a grammar names no role, because a grammar is a preimage several seats may stand over and a role is one seat inside it.