pub struct ToolIdentity {
pub name: CanonicalToolName,
pub version: String,
pub capability_id: CapabilityId,
pub namespace: CapabilityNamespace,
pub executor_ref: ExecutorRef,
pub schema_ref: PackageSidecarRef,
}Expand description
Stable identity for a typed tool declaration.
Fields§
§name: CanonicalToolNameProvider-visible canonical tool name.
version: StringTool version.
capability_id: CapabilityIdRuntime package capability id.
namespace: CapabilityNamespaceCapability namespace.
executor_ref: ExecutorRefExecutor ref registered in the runtime.
schema_ref: PackageSidecarRefSchema sidecar ref used by provider projection and fingerprints.
Implementations§
Source§impl ToolIdentity
impl ToolIdentity
Sourcepub fn new(
name: impl Into<String>,
version: impl Into<String>,
) -> Result<Self, AgentError>
pub fn new( name: impl Into<String>, version: impl Into<String>, ) -> Result<Self, AgentError>
Creates a deterministic typed tool identity from name and version.
Sourcepub fn capability_id(self, id: CapabilityId) -> Self
pub fn capability_id(self, id: CapabilityId) -> Self
Sets an explicit capability id.
Sourcepub fn executor_ref(self, executor_ref: ExecutorRef) -> Self
pub fn executor_ref(self, executor_ref: ExecutorRef) -> Self
Sets an explicit executor ref.
Sourcepub fn schema_ref(self, schema_ref: PackageSidecarRef) -> Self
pub fn schema_ref(self, schema_ref: PackageSidecarRef) -> Self
Sets an explicit schema ref.
Trait Implementations§
Source§impl Clone for ToolIdentity
impl Clone for ToolIdentity
Source§fn clone(&self) -> ToolIdentity
fn clone(&self) -> ToolIdentity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToolIdentity
impl Debug for ToolIdentity
impl Eq for ToolIdentity
Source§impl PartialEq for ToolIdentity
impl PartialEq for ToolIdentity
Source§fn eq(&self, other: &ToolIdentity) -> bool
fn eq(&self, other: &ToolIdentity) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ToolIdentity
Auto Trait Implementations§
impl Freeze for ToolIdentity
impl RefUnwindSafe for ToolIdentity
impl Send for ToolIdentity
impl Sync for ToolIdentity
impl Unpin for ToolIdentity
impl UnsafeUnpin for ToolIdentity
impl UnwindSafe for ToolIdentity
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.