pub struct EffectiveToolPolicy {
pub rules: Vec<ToolRule>,
}Expand description
The tool rules of an agent or skill.
Fields§
§rules: Vec<ToolRule>Implementations§
Source§impl EffectiveToolPolicy
impl EffectiveToolPolicy
pub fn with_action(&self, action: ToolAction) -> impl Iterator<Item = &ToolRule>
pub fn describe(&self) -> Vec<String>
pub fn rendered(&self, action: ToolAction) -> Vec<String>
pub fn is_allowlist(&self) -> bool
Sourcepub fn push_unique(&mut self, rule: ToolRule)
pub fn push_unique(&mut self, rule: ToolRule)
Add rule unless an equal one is there. The first rule’s origin stays: consumers act on
origin (a continued session replaces Project rules with the current ones, and the
platform task opt-out reads only profile and overlay rules), and the rule already
held says what the copy would.
Trait Implementations§
Source§impl Clone for EffectiveToolPolicy
impl Clone for EffectiveToolPolicy
Source§impl Debug for EffectiveToolPolicy
impl Debug for EffectiveToolPolicy
Source§impl Default for EffectiveToolPolicy
impl Default for EffectiveToolPolicy
impl Eq for EffectiveToolPolicy
Source§impl PartialEq for EffectiveToolPolicy
impl PartialEq for EffectiveToolPolicy
Source§impl Serialize for EffectiveToolPolicy
impl Serialize for EffectiveToolPolicy
impl StructuralPartialEq for EffectiveToolPolicy
Auto Trait Implementations§
impl Forget for EffectiveToolPolicy
impl Freeze for EffectiveToolPolicy
impl Move for EffectiveToolPolicy
impl RefUnwindSafe for EffectiveToolPolicy
impl Send for EffectiveToolPolicy
impl Sync for EffectiveToolPolicywhere
RawVecInner: Sync,
impl Unpin for EffectiveToolPolicy
impl UnsafeUnpin for EffectiveToolPolicy
impl UnwindSafe for EffectiveToolPolicy
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.