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 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 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