pub struct AgentTools(/* private fields */);Expand description
Canonically ordered, registry-resolved tools exposed by one agent.
Model tool names are registry-local. This collection rejects collisions across owners and versions because a model request cannot disambiguate them.
Implementations§
Source§impl AgentTools
impl AgentTools
Sourcepub fn try_new<I>(values: I) -> Result<Self, AgentToolsError>where
I: IntoIterator<Item = ToolDescriptor>,
pub fn try_new<I>(values: I) -> Result<Self, AgentToolsError>where
I: IntoIterator<Item = ToolDescriptor>,
Validates and constructs a canonical tool collection.
§Errors
Returns AgentToolsError for a duplicate model-visible name, retired
dependency, or count above the hard ceiling.
Sourcepub fn get(&self, name: &CapabilityName) -> Option<&ToolDescriptor>
pub fn get(&self, name: &CapabilityName) -> Option<&ToolDescriptor>
Returns one tool by its model-visible registry-local name.
Sourcepub fn iter(&self) -> Values<'_, CapabilityName, ToolDescriptor> ⓘ
pub fn iter(&self) -> Values<'_, CapabilityName, ToolDescriptor> ⓘ
Iterates descriptors in canonical name order.
Trait Implementations§
Source§impl Clone for AgentTools
impl Clone for AgentTools
Source§impl Debug for AgentTools
impl Debug for AgentTools
Source§impl Default for AgentTools
impl Default for AgentTools
Source§impl<'de> Deserialize<'de> for AgentTools
impl<'de> Deserialize<'de> for AgentTools
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AgentTools
Source§impl<'a> IntoIterator for &'a AgentTools
impl<'a> IntoIterator for &'a AgentTools
Source§type Item = &'a ToolDescriptor
type Item = &'a ToolDescriptor
The type of the elements being iterated over.
Source§type IntoIter = Values<'a, CapabilityName, ToolDescriptor>
type IntoIter = Values<'a, CapabilityName, ToolDescriptor>
Which kind of iterator are we turning this into?
Source§impl JsonSchema for AgentTools
impl JsonSchema for AgentTools
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for AgentTools
impl PartialEq for AgentTools
Source§impl Serialize for AgentTools
impl Serialize for AgentTools
impl StructuralPartialEq for AgentTools
Source§impl TryFrom<Vec<ToolDescriptor>> for AgentTools
impl TryFrom<Vec<ToolDescriptor>> for AgentTools
Auto Trait Implementations§
impl Forget for AgentTools
impl Freeze for AgentTools
impl Move for AgentTools
impl RefUnwindSafe for AgentTools
impl Send for AgentTools
impl Sync for AgentTools
impl Unpin for AgentTools
impl UnsafeUnpin for AgentTools
impl UnwindSafe for AgentTools
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