pub struct CredentialDefinition {
pub name: String,
pub ttl: String,
pub grants: Vec<String>,
pub loc: Loc,
pub leading_trivia: Vec<Trivia>,
pub trailing_trivia: Vec<Trivia>,
}Expand description
§Fase 92.a — credential <Name> { ttl: grants: }: a named
ephemeral-credential contract. mint <Name> as <binding> (§92.b) mints
a TTL-bounded bearer carrying exactly grants — and the runtime law
(authority_only_attenuates) admits the mint only when
grants ⊆ capabilities(minter). An unknown field in a credential { }
block is a HARD PARSE ERROR (the §83 posture — this is security
surface; a typo’d field must not silently produce a permissive
contract).
Fields§
§name: String§ttl: StringThe bearer’s lifetime — a duration literal ("15m", "900s"),
REQUIRED. Validated by axon-T894: parseable, > 0, and ≤ the closed
24h ceiling (an “ephemeral” credential that lives for days is a
service account wearing a costume — §81 covers that shape).
grants: Vec<String>The capability slugs the minted bearer carries — REQUIRED,
non-empty (axon-T893), each a dotted slug per
is_valid_capability_slug (the requires: grammar). Attenuation
(⊆ minter) is the runtime/mint-time half of the law.
loc: Loc§leading_trivia: Vec<Trivia>Fase 14.b — leading comment trivia.
trailing_trivia: Vec<Trivia>Fase 14.b — trailing comment trivia.
Trait Implementations§
Source§impl Debug for CredentialDefinition
impl Debug for CredentialDefinition
Source§impl Default for CredentialDefinition
impl Default for CredentialDefinition
Source§fn default() -> CredentialDefinition
fn default() -> CredentialDefinition
Auto Trait Implementations§
impl Freeze for CredentialDefinition
impl RefUnwindSafe for CredentialDefinition
impl Send for CredentialDefinition
impl Sync for CredentialDefinition
impl Unpin for CredentialDefinition
impl UnsafeUnpin for CredentialDefinition
impl UnwindSafe for CredentialDefinition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more