pub struct CommandsConfig {
pub metadata: Metadata,
pub commands: Vec<CommandDefinition>,
pub global_options: Vec<OptionDefinition>,
}Expand description
Complete configuration for CLI/REPL commands
This is the root structure deserialized from YAML/JSON files. It contains metadata about the interface and all command definitions.
§Example YAML
metadata:
version: "1.0.0"
prompt: "myapp"
prompt_suffix: " > "
commands:
- name: hello
description: "Say hello"
# ... more fields
global_options: []Fields§
§metadata: MetadataMetadata about the application interface
commands: Vec<CommandDefinition>List of all available commands
global_options: Vec<OptionDefinition>Global options available to all commands
Trait Implementations§
Source§impl Clone for CommandsConfig
impl Clone for CommandsConfig
Source§fn clone(&self) -> CommandsConfig
fn clone(&self) -> CommandsConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 CommandsConfig
impl Debug for CommandsConfig
Source§impl<'de> Deserialize<'de> for CommandsConfig
impl<'de> Deserialize<'de> for CommandsConfig
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
Source§impl PartialEq for CommandsConfig
impl PartialEq for CommandsConfig
Source§impl Serialize for CommandsConfig
impl Serialize for CommandsConfig
impl StructuralPartialEq for CommandsConfig
Auto Trait Implementations§
impl Freeze for CommandsConfig
impl RefUnwindSafe for CommandsConfig
impl Send for CommandsConfig
impl Sync for CommandsConfig
impl Unpin for CommandsConfig
impl UnwindSafe for CommandsConfig
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