pub struct RegisteredTool {
pub capability: Capability,
pub async_mode: bool,
/* private fields */
}Fields§
§capability: Capability§async_mode: boolImplementations§
Source§impl RegisteredTool
impl RegisteredTool
pub fn sync( capability: Capability, handler: impl Fn(ToolCallContext) -> ToolResult + Send + Sync + 'static, ) -> Self
pub fn asynchronous( capability: Capability, handler: impl Fn(ToolCallContext) -> ToolFuture + Send + Sync + 'static, ) -> Self
pub fn call(&self, ctx: ToolCallContext) -> ToolFuture
Trait Implementations§
Source§impl Clone for RegisteredTool
impl Clone for RegisteredTool
Source§fn clone(&self) -> RegisteredTool
fn clone(&self) -> RegisteredTool
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 RegisteredTool
impl !RefUnwindSafe for RegisteredTool
impl Send for RegisteredTool
impl Sync for RegisteredTool
impl Unpin for RegisteredTool
impl UnsafeUnpin for RegisteredTool
impl !UnwindSafe for RegisteredTool
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