pub struct KnownTools {
pub names: Vec<String>,
pub prefixes: Vec<String>,
}Expand description
What a rule’s pattern can be checked against.
Fields§
§names: Vec<String>Full tool names (builtins, plus discovered MCP wire names if known).
prefixes: Vec<String>mcp__<server>__ prefixes for configured servers whose tool lists are
not known here; anything after an exact prefix is taken on trust.
Implementations§
Source§impl KnownTools
impl KnownTools
Sourcepub fn for_servers<'a>(servers: impl IntoIterator<Item = &'a str>) -> Self
pub fn for_servers<'a>(servers: impl IntoIterator<Item = &'a str>) -> Self
Builtins plus one prefix per configured MCP server.
Sourcepub fn names<'a>(names: impl IntoIterator<Item = &'a str>) -> Self
pub fn names<'a>(names: impl IntoIterator<Item = &'a str>) -> Self
Exactly these names (the runtime’s registered set).
Trait Implementations§
Source§impl Clone for KnownTools
impl Clone for KnownTools
Source§impl Debug for KnownTools
impl Debug for KnownTools
Auto Trait Implementations§
impl Freeze for KnownTools
impl RefUnwindSafe for KnownTools
impl Send for KnownTools
impl Sync for KnownTools
impl Unpin for KnownTools
impl UnsafeUnpin for KnownTools
impl UnwindSafe for KnownTools
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