pub enum ToolCaller {
Direct,
CodeExecution,
}Expand description
Specifies which contexts can invoke a tool.
Implements Anthropic’s allowed_callers pattern for programmatic tool calling.
Variants§
Direct
Tool can be called directly by the AI
CodeExecution
Tool can only be called from within code/script execution
Trait Implementations§
Source§impl Clone for ToolCaller
impl Clone for ToolCaller
Source§fn clone(&self) -> ToolCaller
fn clone(&self) -> ToolCaller
Returns a duplicate of the value. Read more
1.0.0 · 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 ToolCaller
impl Debug for ToolCaller
Source§impl Default for ToolCaller
impl Default for ToolCaller
Source§fn default() -> ToolCaller
fn default() -> ToolCaller
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ToolCaller
impl<'de> Deserialize<'de> for ToolCaller
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
Source§impl PartialEq for ToolCaller
impl PartialEq for ToolCaller
Source§impl Serialize for ToolCaller
impl Serialize for ToolCaller
impl Eq for ToolCaller
impl StructuralPartialEq for ToolCaller
Auto Trait Implementations§
impl Freeze for ToolCaller
impl RefUnwindSafe for ToolCaller
impl Send for ToolCaller
impl Sync for ToolCaller
impl Unpin for ToolCaller
impl UnsafeUnpin for ToolCaller
impl UnwindSafe for ToolCaller
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