#[non_exhaustive]pub struct RuntimeGroupSpec {
pub group: GroupSpec,
pub commands: Vec<RuntimeCommandSpec>,
pub groups: Vec<RuntimeGroupSpec>,
}Expand description
Executable command group with runtime children.
Construct with RuntimeGroupSpec::new, then chain with_* methods —
never as a struct literal. #[non_exhaustive] enforces this so the engine
can add fields without a breaking release.
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.group: GroupSpecDeclarative group metadata.
commands: Vec<RuntimeCommandSpec>Executable leaf commands under this group.
groups: Vec<RuntimeGroupSpec>Executable nested groups under this group.
Implementations§
Source§impl RuntimeGroupSpec
impl RuntimeGroupSpec
Sourcepub fn with_command(self, command: RuntimeCommandSpec) -> Self
pub fn with_command(self, command: RuntimeCommandSpec) -> Self
Adds one executable leaf command.
Sourcepub fn with_group(self, group: RuntimeGroupSpec) -> Self
pub fn with_group(self, group: RuntimeGroupSpec) -> Self
Adds one executable nested group.
Sourcepub fn clap_command(&self) -> Command
pub fn clap_command(&self) -> Command
Builds the clap command for parser registration.
Trait Implementations§
Source§impl Clone for RuntimeGroupSpec
impl Clone for RuntimeGroupSpec
Source§fn clone(&self) -> RuntimeGroupSpec
fn clone(&self) -> RuntimeGroupSpec
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 RuntimeGroupSpec
impl Debug for RuntimeGroupSpec
Source§impl Default for RuntimeGroupSpec
impl Default for RuntimeGroupSpec
Source§fn default() -> RuntimeGroupSpec
fn default() -> RuntimeGroupSpec
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeGroupSpec
impl !UnwindSafe for RuntimeGroupSpec
impl Freeze for RuntimeGroupSpec
impl Send for RuntimeGroupSpec
impl Sync for RuntimeGroupSpec
impl Unpin for RuntimeGroupSpec
impl UnsafeUnpin for RuntimeGroupSpec
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