#[non_exhaustive]pub struct ToolMetadata {
pub concurrency: ConcurrencyMode,
pub destructiveness: Destructiveness,
pub interrupt: InterruptBehavior,
pub timeout: Option<Duration>,
pub capabilities: Vec<CapabilityFlag>,
pub max_concurrency: Option<usize>,
}Expand description
Metadata used by dispatch and capability filters.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.concurrency: ConcurrencyModeConcurrency class.
destructiveness: DestructivenessDestructiveness.
interrupt: InterruptBehaviorInterrupt behavior.
timeout: Option<Duration>Optional execution timeout.
capabilities: Vec<CapabilityFlag>Capability flags required/advertised.
max_concurrency: Option<usize>Optional per-tool concurrency cap (alongside ConcurrencyMode).
Implementations§
Source§impl ToolMetadata
impl ToolMetadata
Sourcepub fn exclusive_write() -> Self
pub fn exclusive_write() -> Self
Exclusive mutating tool defaults.
Sourcepub fn shell_execute(timeout: Duration) -> Self
pub fn shell_execute(timeout: Duration) -> Self
Exclusive shell / process execution defaults.
Sourcepub const fn with_max_concurrency(self, n: Option<usize>) -> Self
pub const fn with_max_concurrency(self, n: Option<usize>) -> Self
Set per-tool concurrency cap.
Sourcepub fn allowed_in_read_only(&self) -> bool
pub fn allowed_in_read_only(&self) -> bool
True when the tool is admissible under a read-only capability mode.
Trait Implementations§
Source§impl Clone for ToolMetadata
impl Clone for ToolMetadata
Source§fn clone(&self) -> ToolMetadata
fn clone(&self) -> ToolMetadata
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 ToolMetadata
impl Debug for ToolMetadata
Source§impl Default for ToolMetadata
impl Default for ToolMetadata
Source§impl<'de> Deserialize<'de> for ToolMetadata
impl<'de> Deserialize<'de> for ToolMetadata
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 ToolMetadata
impl RefUnwindSafe for ToolMetadata
impl Send for ToolMetadata
impl Sync for ToolMetadata
impl Unpin for ToolMetadata
impl UnsafeUnpin for ToolMetadata
impl UnwindSafe for ToolMetadata
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