pub struct Profile { /* private fields */ }Expand description
One preimage grammar: which members a mint site writes, in what order, carrying what material.
A grammar exists because a preimage is genuinely its own, never because a type is.
The stem sits ahead of the name, so one owner’s "plan" and another’s are two key spaces rather than one reached twice.
Implementations§
Source§impl Profile
impl Profile
Sourcepub fn encode_into(self, into: &mut Vec<u8>)
pub fn encode_into(self, into: &mut Vec<u8>)
Appends this profile’s canonical bytes: the stem of whoever owns the grammar, its declared name, then its version position in four big-endian bytes.
Seated with the type on purpose: every identity home that commits to a profile writes it through this one road, so a lawful grammar edit moves every identity family at once rather than splitting the homes that restated the spelling from the homes that did not.
Source§impl Profile
impl Profile
Sourcepub const fn declared(
stem: &'static str,
name: &'static str,
version: Version,
) -> Self
pub const fn declared( stem: &'static str, name: &'static str, version: Version, ) -> Self
One grammar, under the stem of whoever owns it, at one version.
Sourcepub const fn version(self) -> Version
pub const fn version(self) -> Version
The declared version — this grammar’s own position, and no other grammar’s.
Sourcepub fn context_for<S: Subject>(self, role: Role) -> String
pub fn context_for<S: Subject>(self, role: Role) -> String
The derive-key context one SUBJECT derives under, at one role.
§Authority
The subject is the TYPE’s and never an argument. A road that took the subject as text would let a caller derive under any key space it could spell — including one another subject already occupies — and the typed identity above it would be a promise the encoder never had to keep.