pub struct ToolRegistration { /* private fields */ }
Implementations§
Source§impl ToolRegistration
impl ToolRegistration
pub fn new( name: &'static str, capability: CapabilityLevel, uses_pty: bool, executor: ToolExecutorFn, ) -> Self
pub fn from_tool( name: &'static str, capability: CapabilityLevel, tool: Arc<dyn Tool>, ) -> Self
pub fn from_tool_instance<T>(
name: &'static str,
capability: CapabilityLevel,
tool: T,
) -> Selfwhere
T: Tool + 'static,
pub fn with_llm_visibility(self, expose: bool) -> Self
pub fn with_pty(self, uses_pty: bool) -> Self
pub fn name(&self) -> &'static str
pub fn capability(&self) -> CapabilityLevel
pub fn uses_pty(&self) -> bool
pub fn expose_in_llm(&self) -> bool
pub fn handler(&self) -> ToolHandler
Trait Implementations§
Source§impl Clone for ToolRegistration
impl Clone for ToolRegistration
Source§fn clone(&self) -> ToolRegistration
fn clone(&self) -> ToolRegistration
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ToolRegistration
impl !RefUnwindSafe for ToolRegistration
impl Send for ToolRegistration
impl Sync for ToolRegistration
impl Unpin for ToolRegistration
impl !UnwindSafe for ToolRegistration
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