pub struct RegisteredSkill { /* private fields */ }Expand description
A skill admitted to the registry: the verified admission plus the pinned code hash.
Only the registry constructs one, so holding a RegisteredSkill
proves the code matched the pinned hash at registration.
Implementations§
Source§impl RegisteredSkill
impl RegisteredSkill
Sourcepub const fn admission(&self) -> &Admission
pub const fn admission(&self) -> &Admission
The verified admission (manifest + granted capabilities).
Sourcepub fn check_call(&self, capability: &CapabilityName) -> Result<(), Error>
pub fn check_call(&self, capability: &CapabilityName) -> Result<(), Error>
Check a capability call against the admitted manifest.
This is the broker’s call-time enforcement: every skill tool
call re-checks the capability against the declarations.
Returns Ok(()) for declared capabilities, Err for
undeclared ones.
§Errors
Returns Error::UndeclaredCapability if the capability was
not declared in the manifest.
Trait Implementations§
Source§impl Clone for RegisteredSkill
impl Clone for RegisteredSkill
Auto Trait Implementations§
impl Freeze for RegisteredSkill
impl RefUnwindSafe for RegisteredSkill
impl Send for RegisteredSkill
impl Sync for RegisteredSkill
impl Unpin for RegisteredSkill
impl UnsafeUnpin for RegisteredSkill
impl UnwindSafe for RegisteredSkill
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
Mutably borrows from an owned value. Read more