#[non_exhaustive]pub struct HostToolDecl {
pub name: String,
pub description: String,
pub input_schema: Value,
pub traits: CallTraits,
pub timeout: Duration,
pub deferred: bool,
pub subagents: bool,
pub host: Option<HostId>,
pub permitted: bool,
}Expand description
A tool the host declared for a session: the model is offered it as it is offered any other, and calling it goes to the host.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: String§description: String§input_schema: Value§traits: CallTraits§timeout: Duration§deferred: boolOffered by name only; the schema comes from ToolSearch.
subagents: boolThe session’s sub-agents are offered it too.
host: Option<HostId>The connection that provides it; None for the session’s own.
permitted: boolThe host lets its calls through without a rule; what refuses or asks still does.
Implementations§
Source§impl HostToolDecl
impl HostToolDecl
pub const DEFAULT_TIMEOUT: Duration
pub const MIN_TIMEOUT: Duration
pub const MAX_TIMEOUT: Duration
pub fn new( name: impl Into<String>, description: impl Into<String>, input_schema: Value, ) -> Self
pub fn traits(self, traits: CallTraits) -> Self
pub fn timeout(self, timeout: Duration) -> Self
pub fn deferred(self, yes: bool) -> Self
pub fn subagents(self, yes: bool) -> Self
pub fn host(self, host: HostId) -> Self
pub fn permitted(self, yes: bool) -> Self
Trait Implementations§
Source§impl Clone for HostToolDecl
impl Clone for HostToolDecl
Source§impl Debug for HostToolDecl
impl Debug for HostToolDecl
Source§impl PartialEq for HostToolDecl
impl PartialEq for HostToolDecl
impl StructuralPartialEq for HostToolDecl
Auto Trait Implementations§
impl Forget for HostToolDecl
impl Freeze for HostToolDecl
impl Move for HostToolDecl
impl RefUnwindSafe for HostToolDecl
impl Send for HostToolDecl
impl Sync for HostToolDecl
impl Unpin for HostToolDecl
impl UnsafeUnpin for HostToolDecl
impl UnwindSafe for HostToolDecl
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