pub struct MockSubtractTool;Available on crate feature
test-utils only.Expand description
A mock tool that subtracts y from x.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MockSubtractTool
impl<'de> Deserialize<'de> for MockSubtractTool
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for MockSubtractTool
impl Serialize for MockSubtractTool
Source§impl Tool for MockSubtractTool
impl Tool for MockSubtractTool
Source§type Error = MockToolError
type Error = MockToolError
Typed error returned by direct calls to this tool. Read more
Source§type Args = MockOperationArgs
type Args = MockOperationArgs
Typed JSON arguments.
Source§fn description(&self) -> String
fn description(&self) -> String
Model-facing description: what the tool does and when to pick it
over another, such as “Use it rather than
wc in shell”. The
model reads it with the tool’s parameters.Source§fn parameters(&self) -> Value
fn parameters(&self) -> Value
JSON Schema for arguments.
Source§async fn call(
&self,
_context: &mut ToolContext,
args: Self::Args,
) -> Result<Self::Output, Self::Error>
async fn call( &self, _context: &mut ToolContext, args: Self::Args, ) -> Result<Self::Output, Self::Error>
Execute the tool.
Source§fn annotations(&self) -> ToolAnnotations
fn annotations(&self) -> ToolAnnotations
What calling the tool does to the world, for the host’s policies
(approval, plan mode, which calls run side by side). Nothing is
stated by default, which reads as the protocol’s defaults
(
ToolAnnotations).Auto Trait Implementations§
impl Forget for MockSubtractTool
impl Freeze for MockSubtractTool
impl Move for MockSubtractTool
impl RefUnwindSafe for MockSubtractTool
impl Send for MockSubtractTool
impl Sync for MockSubtractTool
impl Unpin for MockSubtractTool
impl UnsafeUnpin for MockSubtractTool
impl UnwindSafe for MockSubtractTool
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> 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> IntoToolOutput for Twhere
T: Serialize + 'static,
impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
Source§fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
Convert this value without routing structured data through a string.