pub struct ResolvedGrant { /* private fields */ }Expand description
A Grant paired with the exact Authority body it names — and the
pairing is only constructible when the body’s CID equals the grant’s
authority field. This is the whole point of content addressing: the
caveats an edge is judged against are provably the caveats the grant commits
to, not a body a buggy or hostile resolver substituted. Every function that
reasons about a grant’s authority value takes a ResolvedGrant, so the
mismatch case is unrepresentable rather than merely checked-somewhere.
Implementations§
Source§impl ResolvedGrant
impl ResolvedGrant
Sourcepub fn bind(grant: Grant, authority: Authority) -> Result<Self, BindError>
pub fn bind(grant: Grant, authority: Authority) -> Result<Self, BindError>
Bind authority to grant, verifying authority.id() == grant.authority(). Fails closed on any mismatch or encoding error — the
only way to obtain a ResolvedGrant, so a mismatched body can never reach
the derivation/admission logic.
The authority body — provably the one grant names.