#[non_exhaustive]pub struct ToolDescription {
pub definition: ToolDefinition,
pub hints: ToolHints,
}Expand description
One tool as its catalog describes it: the model-facing definition and
the tool’s declared ToolHints.
A crate::DynamicToolSource lists these from
crate::DynamicToolSource::describe, and tool processors see the bound
set through crate::ProcessorContext::tools.
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.definition: ToolDefinitionThe model-facing definition.
hints: ToolHintsWhat the tool declares about its effects.
Implementations§
Source§impl ToolDescription
impl ToolDescription
Sourcepub fn new(definition: ToolDefinition) -> Self
pub fn new(definition: ToolDefinition) -> Self
A description that declares no hints.
Sourcepub fn with_hints(self, hints: ToolHints) -> Self
pub fn with_hints(self, hints: ToolHints) -> Self
Replaces the declared hints.
Trait Implementations§
Source§impl Clone for ToolDescription
impl Clone for ToolDescription
Source§impl Debug for ToolDescription
impl Debug for ToolDescription
Source§impl PartialEq for ToolDescription
impl PartialEq for ToolDescription
impl StructuralPartialEq for ToolDescription
Auto Trait Implementations§
impl Freeze for ToolDescription
impl RefUnwindSafe for ToolDescription
impl Send for ToolDescription
impl Sync for ToolDescription
impl Unpin for ToolDescription
impl UnsafeUnpin for ToolDescription
impl UnwindSafe for ToolDescription
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