pub enum SpawnerToolGrantConfig {
All(bool),
Selected(Vec<String>),
}Expand description
Tool selection: all tools or a specific subset.
Variants§
All(bool)
management_tools: true or orchestration_tools: true grants all tools in that group.
Selected(Vec<String>)
management_tools: [spawn_agent, list_agents] grants listed tools.
Implementations§
Source§impl SpawnerToolGrantConfig
impl SpawnerToolGrantConfig
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Returns true if any tools in this group are enabled.
Sourcepub fn includes(&self, tool_name: &str) -> bool
pub fn includes(&self, tool_name: &str) -> bool
Returns true if the given tool name is included.
Sourcepub fn granted_tool_ids(&self, all_ids: &[&str]) -> Vec<String>
pub fn granted_tool_ids(&self, all_ids: &[&str]) -> Vec<String>
Returns the selected tool IDs, or all IDs when this config is true.
Sourcepub fn granted_orchestration_tool_ids(&self) -> Vec<String>
pub fn granted_orchestration_tool_ids(&self) -> Vec<String>
Returns the orchestration tool IDs granted by this config.
Sourcepub fn granted_management_tool_ids(&self) -> Vec<String>
pub fn granted_management_tool_ids(&self) -> Vec<String>
Returns the management tool IDs granted by this config.
Trait Implementations§
Source§impl Clone for SpawnerToolGrantConfig
impl Clone for SpawnerToolGrantConfig
Source§fn clone(&self) -> SpawnerToolGrantConfig
fn clone(&self) -> SpawnerToolGrantConfig
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 SpawnerToolGrantConfig
impl Debug for SpawnerToolGrantConfig
Source§impl Default for SpawnerToolGrantConfig
impl Default for SpawnerToolGrantConfig
Source§impl<'de> Deserialize<'de> for SpawnerToolGrantConfig
impl<'de> Deserialize<'de> for SpawnerToolGrantConfig
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 SpawnerToolGrantConfig
impl RefUnwindSafe for SpawnerToolGrantConfig
impl Send for SpawnerToolGrantConfig
impl Sync for SpawnerToolGrantConfig
impl Unpin for SpawnerToolGrantConfig
impl UnsafeUnpin for SpawnerToolGrantConfig
impl UnwindSafe for SpawnerToolGrantConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more