pub struct HostCapabilityFacade<'a> { /* private fields */ }Expand description
The embedding host’s only mutation and full-inspection surface.
This facade borrows the registry-owned table and cannot be serialized or represented as a BEAM term. Component-facing checkers expose no route back.
Implementations§
Source§impl<'a> HostCapabilityFacade<'a>
impl<'a> HostCapabilityFacade<'a>
Sourcepub fn grant(
&self,
component_id: ComponentId,
request: CapabilityRequest,
provenance: GrantProvenance,
) -> Result<Grant, CapabilityMutationError>
pub fn grant( &self, component_id: ComponentId, request: CapabilityRequest, provenance: GrantProvenance, ) -> Result<Grant, CapabilityMutationError>
Applies one explicit grant that exactly matches a manifest declaration.
§Errors
Refuses missing components, undeclared needs, duplicate active grants, or poisoned synchronization with typed current-state information.
Sourcepub fn revoke(
&self,
component_id: ComponentId,
request: &CapabilityRequest,
) -> Result<RevokeOutcome, CapabilityMutationError>
pub fn revoke( &self, component_id: ComponentId, request: &CapabilityRequest, ) -> Result<RevokeOutcome, CapabilityMutationError>
Removes one exact grant, returning a typed idempotent no-op when absent.
§Errors
Refuses missing components or poisoned synchronization.
Sourcepub fn grants_for(
&self,
component_id: ComponentId,
) -> Result<Vec<Grant>, CapabilityMutationError>
pub fn grants_for( &self, component_id: ComponentId, ) -> Result<Vec<Grant>, CapabilityMutationError>
Returns active grants for one registered component, including provenance.
§Errors
Refuses missing components or poisoned synchronization.
Sourcepub fn full_table(&self) -> Vec<Grant>
pub fn full_table(&self) -> Vec<Grant>
Returns a wait-free snapshot of every active grant row and provenance.
Sourcepub fn checker(
&self,
component_id: ComponentId,
) -> Result<CapabilityChecker, CapabilityMutationError>
pub fn checker( &self, component_id: ComponentId, ) -> Result<CapabilityChecker, CapabilityMutationError>
Creates a retained check-only path for a registered component.
§Errors
Refuses missing components or poisoned synchronization.