pub struct CliHelpV2 {
pub schema: String,
pub command_path: String,
pub about: Option<String>,
pub shapes: Vec<CliShape>,
pub subcommands: Vec<String>,
pub notes: BTreeMap<String, String>,
pub defaults: BTreeMap<String, CliValue>,
}Expand description
Agent-first help-v2 payload.
defaults carries CliValue, which admits finite f64, so this model is
PartialEq but not Eq.
Fields§
§schema: String§command_path: String§about: Option<String>§shapes: Vec<CliShape>Every legal shape of this command, each complete.
Help is answered in one round trip rather than two. A second level would only pay off by omitting something, and what it omitted — the optional arguments — would be undiscoverable to a caller that stopped at the first level.
subcommands: Vec<String>§notes: BTreeMap<String, String>Argument meanings. Arguments belong to the command, not to one shape, so these are stated once rather than per shape.
defaults: BTreeMap<String, CliValue>The single public default value for each applicable argument.
Trait Implementations§
impl StructuralPartialEq for CliHelpV2
Auto Trait Implementations§
impl Forget for CliHelpV2
impl Freeze for CliHelpV2where
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<CliShape>: Freeze,
PhantomData<String>: Freeze,
*const LeafNode<String, String> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, String)>>: Freeze,
*const LeafNode<String, CliValue> is !null: Freeze,
PhantomData<Box<(String, CliValue)>>: Freeze,
impl Move for CliHelpV2
impl RefUnwindSafe for CliHelpV2
impl Send for CliHelpV2
impl Sync for CliHelpV2
impl Unpin for CliHelpV2
impl UnsafeUnpin for CliHelpV2where
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<CliShape>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
*const LeafNode<String, String> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, String)>>: UnsafeUnpin,
*const LeafNode<String, CliValue> is !null: UnsafeUnpin,
PhantomData<Box<(String, CliValue)>>: UnsafeUnpin,
impl UnwindSafe for CliHelpV2where
RawVecInner: UnwindSafe,
BTreeMap<String, String>: UnwindSafe,
BTreeMap<String, CliValue>: UnwindSafe,
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