pub struct Tool { /* private fields */ }Expand description
Data-only declaration for a synchronous toolkit tool.
Lower it into a ToolkitPackBundle; do not execute it directly.
Implementations§
Source§impl Tool
impl Tool
Sourcepub fn builder(
tool_name: impl Into<String>,
executor_ref: impl Into<String>,
schema_id: impl Into<String>,
policy_ref: PolicyRef,
) -> ToolBuilder
pub fn builder( tool_name: impl Into<String>, executor_ref: impl Into<String>, schema_id: impl Into<String>, policy_ref: PolicyRef, ) -> ToolBuilder
Starts a data-only builder for a synchronous toolkit tool.
Sourcepub fn canonical_tool_name(&self) -> &CanonicalToolName
pub fn canonical_tool_name(&self) -> &CanonicalToolName
Returns the canonical tool name exposed to providers.
Sourcepub fn executor_ref(&self) -> &ExecutorRef
pub fn executor_ref(&self) -> &ExecutorRef
Returns the declared executor ref without resolving or executing it.
Sourcepub fn mode(&self) -> &ToolkitToolExecutionMode
pub fn mode(&self) -> &ToolkitToolExecutionMode
Returns the declaration mode.
Sourcepub fn snapshot(&self) -> &ToolPackToolSnapshot
pub fn snapshot(&self) -> &ToolPackToolSnapshot
Returns the core tool-pack snapshot this wrapper lowers to.
Sourcepub fn into_snapshot(self) -> ToolPackToolSnapshot
pub fn into_snapshot(self) -> ToolPackToolSnapshot
Consumes this wrapper into the core tool-pack snapshot.
Trait Implementations§
impl Eq for Tool
impl StructuralPartialEq for Tool
Auto Trait Implementations§
impl Freeze for Tool
impl RefUnwindSafe for Tool
impl Send for Tool
impl Sync for Tool
impl Unpin for Tool
impl UnsafeUnpin for Tool
impl UnwindSafe for Tool
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.