pub struct SharedRustTool<T>(pub Arc<T>);Expand description
Shared alloc::sync::Arc-backed wrapper for any RustTool implementation,
enabling cheap cloning across registries and subagent scopes.
Tuple Fields§
§0: Arc<T>Implementations§
Trait Implementations§
Source§const DESCRIPTION: &'static str = T::DESCRIPTION
const DESCRIPTION: &'static str = T::DESCRIPTION
Human-readable description shown to the model.
Source§const EFFECT: ToolEffect = T::EFFECT
const EFFECT: ToolEffect = T::EFFECT
Execution effect of the tool.
Source§const IDEMPOTENT: bool = T::IDEMPOTENT
const IDEMPOTENT: bool = T::IDEMPOTENT
Whether the tool is idempotent / read-only safe for concurrent wave execution.
Source§const PROVENANCE: ToolProvenance = T::PROVENANCE
const PROVENANCE: ToolProvenance = T::PROVENANCE
Data-provenance and trust classification of the tool. Read more
Source§const SANITIZE_OUTPUT: bool = T::SANITIZE_OUTPUT
const SANITIZE_OUTPUT: bool = T::SANITIZE_OUTPUT
Shorthand: neutralize control tokens in this tool’s output. Read more
Source§const QUARANTINE_OUTPUT: bool = T::QUARANTINE_OUTPUT
const QUARANTINE_OUTPUT: bool = T::QUARANTINE_OUTPUT
Shorthand: wrap this tool’s output in a
<tool_output_quarantine> envelope. Read moreSource§const OUTPUT_SANITIZATION: OutputSanitization = T::OUTPUT_SANITIZATION
const OUTPUT_SANITIZATION: OutputSanitization = T::OUTPUT_SANITIZATION
Automatic prompt-injection sanitization policy applied to this tool’s output. Read more
Source§fn effect(&self) -> ToolEffect
fn effect(&self) -> ToolEffect
Return the execution effect of the tool.
Source§fn provenance(&self) -> ToolProvenance
fn provenance(&self) -> ToolProvenance
Return the data-provenance tier of the tool.
Source§fn is_idempotent(&self) -> bool
fn is_idempotent(&self) -> bool
Return whether the tool is idempotent (read-only).
Source§fn output_sanitization(&self) -> OutputSanitization
fn output_sanitization(&self) -> OutputSanitization
Return the automatic prompt-injection sanitization policy for this tool’s output.
Source§fn description(&self) -> Cow<'static, str>
fn description(&self) -> Cow<'static, str>
Return the tool description used in
ToolDefinition. Read moreAuto Trait Implementations§
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ErasedTool for Twhere
T: RustTool,
impl<T> ErasedTool for Twhere
T: RustTool,
Source§fn call_erased<'a>(
&'a self,
args: Value,
ctx: &'a ToolContext,
) -> Pin<Box<dyn Future<Output = Result<ToolOutput, ToolError>> + Send + 'a>>
fn call_erased<'a>( &'a self, args: Value, ctx: &'a ToolContext, ) -> Pin<Box<dyn Future<Output = Result<ToolOutput, ToolError>> + Send + 'a>>
Deserialize
args and call the handler, returning a boxed future.Source§fn call_erased_str<'a>(
&'a self,
args_json: &'a str,
ctx: &'a ToolContext,
) -> Pin<Box<dyn Future<Output = Result<ToolOutput, ToolError>> + Send + 'a>>
fn call_erased_str<'a>( &'a self, args_json: &'a str, ctx: &'a ToolContext, ) -> Pin<Box<dyn Future<Output = Result<ToolOutput, ToolError>> + Send + 'a>>
Deserialize
args_json directly from a JSON string and call the handler,
returning a boxed future without intermediate DOM allocation.