pub struct MemoryTool<A> { /* private fields */ }Expand description
Nanocodex tool exposing bounded memory operations.
Implementations§
Source§impl<A> MemoryTool<A>where
A: MutationAuthorizer,
impl<A> MemoryTool<A>where
A: MutationAuthorizer,
Sourcepub const fn new(store: SelectedMemoryStore, authorizer: A) -> Self
pub const fn new(store: SelectedMemoryStore, authorizer: A) -> Self
Creates a tool over store with the supplied mutation authorizer.
Trait Implementations§
Source§impl<A> Tool for MemoryTool<A>where
A: MutationAuthorizer + 'static,
impl<A> Tool for MemoryTool<A>where
A: MutationAuthorizer + 'static,
Source§fn definition(&self) -> ToolDefinition
fn definition(&self) -> ToolDefinition
Returns the complete model-visible definition and registry name.
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
input: ToolInput,
context: ToolContext<'life1>,
) -> Pin<Box<dyn Future<Output = ToolResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
input: ToolInput,
context: ToolContext<'life1>,
) -> Pin<Box<dyn Future<Output = ToolResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Executes one invocation.
Source§fn supports_parallel_tool_calls(&self) -> bool
fn supports_parallel_tool_calls(&self) -> bool
Returns whether this handler is safe to execute alongside sibling tool calls. Read more
Auto Trait Implementations§
impl<A> !Freeze for MemoryTool<A>
impl<A> !RefUnwindSafe for MemoryTool<A>
impl<A> !UnwindSafe for MemoryTool<A>
impl<A> Send for MemoryTool<A>where
A: Send,
impl<A> Sync for MemoryTool<A>where
A: Sync,
impl<A> Unpin for MemoryTool<A>where
A: Unpin,
impl<A> UnsafeUnpin for MemoryTool<A>where
A: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.