pub struct AgentCapability { /* private fields */ }Expand description
Declarative capability group for agent-mode visibility.
Implementations§
Source§impl AgentCapability
impl AgentCapability
Sourcepub const fn commands(&self) -> &'static [CommandSelector]
pub const fn commands(&self) -> &'static [CommandSelector]
Return the command selectors for this capability.
Sourcepub const fn flags(&self) -> &'static [FlagSelector]
pub const fn flags(&self) -> &'static [FlagSelector]
Return the flag selectors for this capability.
Sourcepub const fn examples(&self) -> Option<&'static [&'static str]>
pub const fn examples(&self) -> Option<&'static [&'static str]>
Return example invocations, if any.
Sourcepub const fn constraints(&self) -> Option<&'static str>
pub const fn constraints(&self) -> Option<&'static str>
Return the constraints prose, if any.
Sourcepub const fn when_to_use(&self) -> Option<&'static str>
pub const fn when_to_use(&self) -> Option<&'static str>
Return the when-to-use prose, if any.
Sourcepub const fn when_not_to_use(&self) -> Option<&'static str>
pub const fn when_not_to_use(&self) -> Option<&'static str>
Return the when-not-to-use prose, if any.
Sourcepub const fn new(
name: &'static str,
summary: &'static str,
commands: &'static [CommandSelector],
flags: &'static [FlagSelector],
) -> AgentCapability
pub const fn new( name: &'static str, summary: &'static str, commands: &'static [CommandSelector], flags: &'static [FlagSelector], ) -> AgentCapability
Create a new AgentCapability.
Sourcepub const fn minimal(
name: &'static str,
commands: &'static [CommandSelector],
flags: &'static [FlagSelector],
) -> AgentCapability
pub const fn minimal( name: &'static str, commands: &'static [CommandSelector], flags: &'static [FlagSelector], ) -> AgentCapability
Create a new AgentCapability without optional prose metadata.
Sourcepub const fn with_examples(
self,
examples: &'static [&'static str],
) -> AgentCapability
pub const fn with_examples( self, examples: &'static [&'static str], ) -> AgentCapability
Attach example invocations.
Sourcepub const fn with_output(self, output: &'static str) -> AgentCapability
pub const fn with_output(self, output: &'static str) -> AgentCapability
Attach output contract prose.
Sourcepub const fn with_constraints(
self,
constraints: &'static str,
) -> AgentCapability
pub const fn with_constraints( self, constraints: &'static str, ) -> AgentCapability
Attach constraints prose.
Sourcepub const fn with_when_to_use(
self,
when_to_use: &'static str,
) -> AgentCapability
pub const fn with_when_to_use( self, when_to_use: &'static str, ) -> AgentCapability
Attach when-to-use prose.
Sourcepub const fn with_when_not_to_use(
self,
when_not_to_use: &'static str,
) -> AgentCapability
pub const fn with_when_not_to_use( self, when_not_to_use: &'static str, ) -> AgentCapability
Attach when-not-to-use prose.
Trait Implementations§
Source§impl Clone for AgentCapability
impl Clone for AgentCapability
Source§fn clone(&self) -> AgentCapability
fn clone(&self) -> AgentCapability
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 moreimpl Copy for AgentCapability
Source§impl Debug for AgentCapability
impl Debug for AgentCapability
impl Eq for AgentCapability
Source§impl PartialEq for AgentCapability
impl PartialEq for AgentCapability
Source§fn eq(&self, other: &AgentCapability) -> bool
fn eq(&self, other: &AgentCapability) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AgentCapability
Auto Trait Implementations§
impl Freeze for AgentCapability
impl RefUnwindSafe for AgentCapability
impl Send for AgentCapability
impl Sync for AgentCapability
impl Unpin for AgentCapability
impl UnsafeUnpin for AgentCapability
impl UnwindSafe for AgentCapability
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