pub struct ToolAdmission { /* private fields */ }Expand description
Runtime-owned allowlist for tool execution.
Admission does not change the advertised tool surface. A denied call is resolved as a structured tool failure by the runtime before input validation or executor dispatch.
Implementations§
Source§impl ToolAdmission
impl ToolAdmission
Sourcepub fn allow_only<I>(tools: I) -> Selfwhere
I: IntoIterator<Item = ToolName>,
pub fn allow_only<I>(tools: I) -> Selfwhere
I: IntoIterator<Item = ToolName>,
Creates an admission policy that allows exactly the supplied names.
Sourcepub fn allows(&self, tool_name: &ToolName) -> bool
pub fn allows(&self, tool_name: &ToolName) -> bool
Returns whether a tool call is admitted for execution.
Sourcepub fn allowed_tools(&self) -> &BTreeSet<ToolName>
pub fn allowed_tools(&self) -> &BTreeSet<ToolName>
Returns the admitted tool names in deterministic order.
Trait Implementations§
Source§impl Clone for ToolAdmission
impl Clone for ToolAdmission
Source§impl Debug for ToolAdmission
impl Debug for ToolAdmission
impl Eq for ToolAdmission
Source§impl PartialEq for ToolAdmission
impl PartialEq for ToolAdmission
impl StructuralPartialEq for ToolAdmission
Auto Trait Implementations§
impl Forget for ToolAdmission
impl Freeze for ToolAdmission
impl Move for ToolAdmission
impl RefUnwindSafe for ToolAdmission
impl Send for ToolAdmission
impl Sync for ToolAdmission
impl Unpin for ToolAdmission
impl UnsafeUnpin for ToolAdmission
impl UnwindSafe for ToolAdmission
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
Compare self to
key and return true if they are equal.