pub struct MemorySearchDispatcher { /* private fields */ }Expand description
Tool dispatcher that provides the memory_search tool.
Wraps an Arc<dyn MemoryStore> and exposes semantic search as an
agent-callable tool. Created by the factory when the memory-store-session
feature is enabled.
Implementations§
Source§impl MemorySearchDispatcher
impl MemorySearchDispatcher
Sourcepub fn new(store: Arc<dyn MemoryStore>) -> Self
pub fn new(store: Arc<dyn MemoryStore>) -> Self
Create a new memory search dispatcher backed by the given store.
Sourcepub fn usage_instructions() -> &'static str
pub fn usage_instructions() -> &'static str
Usage instructions for the system prompt.
Trait Implementations§
Source§impl AgentToolDispatcher for MemorySearchDispatcher
impl AgentToolDispatcher for MemorySearchDispatcher
Source§fn dispatch<'life0, 'life1, 'async_trait>(
&'life0 self,
call: ToolCallView<'life1>,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn dispatch<'life0, 'life1, 'async_trait>(
&'life0 self,
call: ToolCallView<'life1>,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute a tool call
Source§fn poll_external_updates<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ExternalToolUpdate> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn poll_external_updates<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ExternalToolUpdate> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Poll for external tool updates from background operations (e.g. async MCP loading). Read more
Source§fn bind_wait_interrupt(
self: Arc<Self>,
_rx: Receiver<Option<WaitInterrupt>>,
) -> Result<Arc<dyn AgentToolDispatcher>, WaitInterruptBindError>
fn bind_wait_interrupt( self: Arc<Self>, _rx: Receiver<Option<WaitInterrupt>>, ) -> Result<Arc<dyn AgentToolDispatcher>, WaitInterruptBindError>
Bind a wait-interrupt receiver into this dispatcher, returning a rebound dispatcher. Read more
Source§fn supports_wait_interrupt(&self) -> bool
fn supports_wait_interrupt(&self) -> bool
Whether this dispatcher supports wait interrupt binding. Read more
Auto Trait Implementations§
impl Freeze for MemorySearchDispatcher
impl !RefUnwindSafe for MemorySearchDispatcher
impl Send for MemorySearchDispatcher
impl Sync for MemorySearchDispatcher
impl Unpin for MemorySearchDispatcher
impl UnsafeUnpin for MemorySearchDispatcher
impl !UnwindSafe for MemorySearchDispatcher
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more