pub struct InMemoryToolRegistry { /* private fields */ }Expand description
In-memory ToolRegistry backed by a RwLock<HashMap>. The default
registry the MCP host and native backends register into on mount; the
router queries this when resolving an IntentToken.
Implementations§
Trait Implementations§
Source§impl Default for InMemoryToolRegistry
impl Default for InMemoryToolRegistry
Source§impl ToolRegistry for InMemoryToolRegistry
impl ToolRegistry for InMemoryToolRegistry
fn register<'life0, 'async_trait>(
&'life0 self,
descriptor: ToolDescriptor,
) -> Pin<Box<dyn Future<Output = Result<(), IntentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn deregister<'life0, 'life1, 'async_trait>(
&'life0 self,
tool_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), IntentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<ToolDescriptor>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
tool_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<ToolDescriptor>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl !Freeze for InMemoryToolRegistry
impl RefUnwindSafe for InMemoryToolRegistry
impl Send for InMemoryToolRegistry
impl Sync for InMemoryToolRegistry
impl Unpin for InMemoryToolRegistry
impl UnsafeUnpin for InMemoryToolRegistry
impl UnwindSafe for InMemoryToolRegistry
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