pub struct InMemoryCapabilityRegistry { /* private fields */ }Expand description
In-memory CapabilityRegistry, seeded with ADR-001’s six built-in
capabilities. A deployer registers additional named instances (e.g.
grpc-egress:inventory-svc) via Self::register without editing
this crate’s source.
Implementations§
Source§impl InMemoryCapabilityRegistry
impl InMemoryCapabilityRegistry
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Seeds the six built-in capabilities: http-egress, grpc-egress,
llm-complete, mcp-egress, database, secrets — each
import_name equal to its own capability name.
Sourcepub fn register(
self,
name: impl Into<String>,
descriptor: CapabilityDescriptor,
) -> Self
pub fn register( self, name: impl Into<String>, descriptor: CapabilityDescriptor, ) -> Self
Registers descriptor under name, replacing any existing entry
with the same name. Fluent — chainable after Self::with_defaults
without disturbing the six built-ins it seeded.
Trait Implementations§
Source§impl CapabilityRegistry for InMemoryCapabilityRegistry
impl CapabilityRegistry for InMemoryCapabilityRegistry
Source§fn descriptor(&self, capability: &str) -> Option<&CapabilityDescriptor>
fn descriptor(&self, capability: &str) -> Option<&CapabilityDescriptor>
Look up
capability’s descriptor, if registered.Auto Trait Implementations§
impl Freeze for InMemoryCapabilityRegistry
impl RefUnwindSafe for InMemoryCapabilityRegistry
impl Send for InMemoryCapabilityRegistry
impl Sync for InMemoryCapabilityRegistry
impl Unpin for InMemoryCapabilityRegistry
impl UnsafeUnpin for InMemoryCapabilityRegistry
impl UnwindSafe for InMemoryCapabilityRegistry
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