#[non_exhaustive]pub enum ToolEffect {
ReadOnly,
Mutating,
Destructive,
}Expand description
Side-effect classification of a tool — surfaces both to the runtime (Approver defaults, retry policy) and to the LLM (rendered in the tool description so the model can reason about safety on its own).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ReadOnly
Pure read — no side effects on external state. Safe to call in parallel, retry on transport hiccups, cache aggressively. Examples: search, fetch, calculator.
Mutating
Changes external state but the change is recoverable (overwrite, undo, idempotent overwrite). Retry-safe with a reasonable backoff. Examples: write a file, set a config value, update a record.
Destructive
Irreversible — once it runs the operator cannot undo. Default
Approver policy MAY require human confirmation. Retry is
off by default. Examples: send an email, post a payment,
delete a row, run an rm -rf.
Implementations§
Trait Implementations§
Source§impl Clone for ToolEffect
impl Clone for ToolEffect
Source§fn clone(&self) -> ToolEffect
fn clone(&self) -> ToolEffect
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ToolEffect
impl Debug for ToolEffect
Source§impl Default for ToolEffect
impl Default for ToolEffect
Source§fn default() -> ToolEffect
fn default() -> ToolEffect
Source§impl<'de> Deserialize<'de> for ToolEffect
impl<'de> Deserialize<'de> for ToolEffect
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>,
Source§impl Display for ToolEffect
impl Display for ToolEffect
Source§impl Hash for ToolEffect
impl Hash for ToolEffect
Source§impl PartialEq for ToolEffect
impl PartialEq for ToolEffect
Source§fn eq(&self, other: &ToolEffect) -> bool
fn eq(&self, other: &ToolEffect) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ToolEffect
impl Serialize for ToolEffect
impl Copy for ToolEffect
impl Eq for ToolEffect
impl StructuralPartialEq for ToolEffect
Auto Trait Implementations§
impl Freeze for ToolEffect
impl RefUnwindSafe for ToolEffect
impl Send for ToolEffect
impl Sync for ToolEffect
impl Unpin for ToolEffect
impl UnsafeUnpin for ToolEffect
impl UnwindSafe for ToolEffect
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.