pub struct Capability {
pub id: &'static str,
pub command: &'static [&'static str],
pub summary: &'static str,
pub required_args: &'static [&'static str],
pub optional_args: &'static [&'static str],
pub formats: OutputFormats,
pub exit: ExitSemantics,
pub network: NetworkRequirement,
pub safety: Safety,
pub requires_confirmation: bool,
pub evidence: Evidence,
pub notes: Option<&'static str>,
}Expand description
One machine-described CLI capability.
Serialize-only: the borrowed &'static fields describe a registry compiled
into the binary, and export (to_json) is the consumer contract. Anything
reading an exported document back should deserialize into its own owned
types (see the round-trip test for a worked example).
Fields§
§id: &'static strStable unique id, family.action, snake/dotted lowercase.
command: &'static [&'static str]Argument path to the leaf, e.g. ["wasm", "metadata"].
summary: &'static strOne-line summary of what it returns.
required_args: &'static [&'static str]Positional arguments and mandatory flags.
optional_args: &'static [&'static str]Optional flags that change or extend the happy path.
formats: OutputFormats§exit: ExitSemantics§network: NetworkRequirement§safety: Safety§requires_confirmation: boolTrue when an agent must obtain explicit human confirmation before
invoking. Always true for Safety::Mutating.
evidence: Evidence§notes: Option<&'static str>Caveats, prerequisites, or the reason an entry is Unverified.
Implementations§
Trait Implementations§
Source§impl Clone for Capability
impl Clone for Capability
Source§impl Debug for Capability
impl Debug for Capability
impl Eq for Capability
Source§impl PartialEq for Capability
impl PartialEq for Capability
Source§impl Serialize for Capability
impl Serialize for Capability
impl StructuralPartialEq for Capability
Auto Trait Implementations§
impl Freeze for Capability
impl RefUnwindSafe for Capability
impl Send for Capability
impl Sync for Capability
impl Unpin for Capability
impl UnsafeUnpin for Capability
impl UnwindSafe for Capability
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