pub struct ToolDef {
pub name: String,
pub description: String,
pub parameters: Option<Parameters>,
pub kind: Kind,
pub command: Vec<String>,
pub cwd: Cwd,
pub timeout_secs: Option<u64>,
pub policy: Option<Policy>,
pub env: Vec<String>,
pub override_builtin: bool,
}Fields§
§name: String§description: String§parameters: Option<Parameters>§kind: Kind§command: Vec<String>argv, run without a shell. sh -c '...' is allowed but then the quoting is yours.
cwd: Cwd§timeout_secs: Option<u64>§policy: Option<Policy>Default ask. allow means this tool runs without a prompt.
env: Vec<String>Names copied from the agent’s environment into the command’s (nothing else is).
override_builtin: boolReplace the tool of the same name (built-in or from an earlier plugin). Required.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToolDef
impl<'de> Deserialize<'de> for ToolDef
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
Auto Trait Implementations§
impl Forget for ToolDef
impl Freeze for ToolDefwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const Value is !null: Freeze,
PhantomData<Value>: Freeze,
PhantomData<String>: Freeze,
impl Move for ToolDef
impl RefUnwindSafe for ToolDef
impl Send for ToolDef
impl Sync for ToolDef
impl Unpin for ToolDef
impl UnsafeUnpin for ToolDefwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const Value is !null: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for ToolDef
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