Skip to main content

HasToolRef

Trait HasToolRef 

Source
pub trait HasToolRef: Send + Sync {
    // Required method
    fn tool(&self) -> &dyn Tool;
}
Expand description

Trait for contexts that can expose a tool reference for delegated metadata, validation, and execution.

Required Methods§

Source

fn tool(&self) -> &dyn Tool

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<Ctx> HasToolRef for Ctx
where Ctx: HasInnerTool + Send + Sync,

Source§

impl<Runtime: Send + Sync, T> HasToolRef for TypedToolCtx<Runtime, T>
where T: Tool + Send + Sync,