pub struct GrantCoverage<'a> {
pub destination: &'a str,
pub slot_schema_hash: &'a str,
pub covered_capabilities: &'a [String],
}Expand description
The coverage record a grant binds: the pinned destination, the slot-schema hash, and the covered capabilities.
Borrowed so a caller can build it from decoded fields without copying.
slot_schema_hash is #618’s template-coverage hash; covered_capabilities
are stable kebab-case polyc_capability names (the consumer resolves them
with CapabilitySet::from_names, which is fail-closed on unknown names).
Changing the destination or the slot-schema hash changes the canonical, so a
coverage drift voids the grant — a new approval ceremony is required.
Fields§
§destination: &'a strThe pinned egress destination the grant covers.
Canonicalization contract: the compact JSON of the template’s
destination map serialized from a BTreeMap (key-sorted, no
whitespace). Coverage equality is byte equality of this string, so the
mint side (the enrollment ceremony) and every verify side (the dispatch
resolver recomputing current coverage) MUST produce it the same way —
always serde_json::to_string of the BTreeMap destination, never a
hand-built string. A formatting-only difference reads as coverage drift
and voids the grant.
slot_schema_hash: &'a strThe content-template slot-schema hash the grant covers (#618).
covered_capabilities: &'a [String]The stable kebab-case capability names the grant covers.
Trait Implementations§
Source§impl<'a> Clone for GrantCoverage<'a>
impl<'a> Clone for GrantCoverage<'a>
Source§fn clone(&self) -> GrantCoverage<'a>
fn clone(&self) -> GrantCoverage<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'a> Copy for GrantCoverage<'a>
Auto Trait Implementations§
impl<'a> Freeze for GrantCoverage<'a>
impl<'a> RefUnwindSafe for GrantCoverage<'a>
impl<'a> Send for GrantCoverage<'a>
impl<'a> Sync for GrantCoverage<'a>
impl<'a> Unpin for GrantCoverage<'a>
impl<'a> UnsafeUnpin for GrantCoverage<'a>
impl<'a> UnwindSafe for GrantCoverage<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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