pub struct CapabilityRegistry { /* private fields */ }Expand description
Host-controlled registry of trusted capabilities.
Implementations§
Source§impl CapabilityRegistry
impl CapabilityRegistry
Sourcepub fn register<C: RuleCapability + 'static>(
self,
capability: C,
) -> Result<Self, EngineError>
pub fn register<C: RuleCapability + 'static>( self, capability: C, ) -> Result<Self, EngineError>
Registers a capability; duplicate IDs are rejected.
Sourcepub fn with_refiner<R: OutcomeRefiner + 'static>(self, refiner: R) -> Self
pub fn with_refiner<R: OutcomeRefiner + 'static>(self, refiner: R) -> Self
Installs the trusted code that applies rule refinements reading the model, replacing any installed before.
Sourcepub fn refiner(&self) -> Option<&Arc<dyn OutcomeRefiner>>
pub fn refiner(&self) -> Option<&Arc<dyn OutcomeRefiner>>
The installed outcome refiner, if any.
Trait Implementations§
Source§impl Clone for CapabilityRegistry
impl Clone for CapabilityRegistry
Auto Trait Implementations§
impl !RefUnwindSafe for CapabilityRegistry
impl !UnwindSafe for CapabilityRegistry
impl Freeze for CapabilityRegistry
impl Send for CapabilityRegistry
impl Sync for CapabilityRegistry
impl Unpin for CapabilityRegistry
impl UnsafeUnpin for CapabilityRegistry
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