pub struct BuiltinToolsConfig {
pub disabled: Vec<String>,
pub enabled: Vec<String>,
}Expand description
Configuration for controlling which built-in tools are available.
Supports two mutually exclusive modes:
disabled: blacklist specific tools (all others remain enabled)enabled: whitelist specific tools (all others are disabled)
Fields§
§disabled: Vec<String>List of tool names to disable (blacklist mode).
enabled: Vec<String>List of tool names to enable (whitelist mode). All others are disabled.
Implementations§
Source§impl BuiltinToolsConfig
impl BuiltinToolsConfig
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validate the config: disabled and enabled must not both be set.
Sourcepub fn is_tool_allowed(&self, name: &str) -> bool
pub fn is_tool_allowed(&self, name: &str) -> bool
Check whether a tool with the given name should be available.
Sourcepub fn warn_unknown_tools(&self, known: &[&str])
pub fn warn_unknown_tools(&self, known: &[&str])
Log warnings for tool names that are not in the known set.
Trait Implementations§
Source§impl Clone for BuiltinToolsConfig
impl Clone for BuiltinToolsConfig
Source§fn clone(&self) -> BuiltinToolsConfig
fn clone(&self) -> BuiltinToolsConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BuiltinToolsConfig
impl Debug for BuiltinToolsConfig
Source§impl Default for BuiltinToolsConfig
impl Default for BuiltinToolsConfig
Source§fn default() -> BuiltinToolsConfig
fn default() -> BuiltinToolsConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BuiltinToolsConfig
impl<'de> Deserialize<'de> for BuiltinToolsConfig
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 Freeze for BuiltinToolsConfig
impl RefUnwindSafe for BuiltinToolsConfig
impl Send for BuiltinToolsConfig
impl Sync for BuiltinToolsConfig
impl Unpin for BuiltinToolsConfig
impl UnsafeUnpin for BuiltinToolsConfig
impl UnwindSafe for BuiltinToolsConfig
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