pub struct HostTool {
pub name: String,
pub description: String,
pub input_schema: Value,
pub timeout_ms: Option<u64>,
pub execute: ToolCallback,
}Expand description
A single host tool within a ToolKit.
Fields§
§name: String§description: String§input_schema: ValueJSON Schema for the tool input (forwarded to the sidecar register_host_callbacks definition).
timeout_ms: Option<u64>§execute: ToolCallbackHost-side implementation, invoked when the guest calls <toolkit>:<tool>.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HostTool
impl !UnwindSafe for HostTool
impl Freeze for HostTool
impl Send for HostTool
impl Sync for HostTool
impl Unpin for HostTool
impl UnsafeUnpin for HostTool
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.