#[non_exhaustive]pub struct ToolDescription {
pub definition: ToolDefinition,
pub metadata: ToolMetadata,
}Expand description
One tool as its catalog describes it: the model-facing definition and
non-persisted ToolMetadata.
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.
metadata: ToolMetadataNon-persisted metadata declared beside the definition.
Implementations§
Source§impl ToolDescription
impl ToolDescription
Sourcepub fn new(definition: ToolDefinition) -> Self
pub fn new(definition: ToolDefinition) -> Self
A description with empty metadata.
Sourcepub fn with_metadata(self, metadata: ToolMetadata) -> Self
pub fn with_metadata(self, metadata: ToolMetadata) -> Self
Replaces the tool metadata.
Trait Implementations§
Source§impl Clone for ToolDescription
impl Clone for ToolDescription
Auto Trait Implementations§
impl !RefUnwindSafe for ToolDescription
impl !UnwindSafe for ToolDescription
impl Forget for ToolDescription
impl Freeze for ToolDescription
impl Move for ToolDescription
impl Send for ToolDescription
impl Sync for ToolDescription
impl Unpin for ToolDescription
impl UnsafeUnpin 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