pub enum Commands {
Add {
source: PathBuf,
target: Option<PathBuf>,
contents: bool,
name: Option<String>,
},
List,
Info {
id: String,
},
Remove {
id: String,
with_target: bool,
},
Config {
action: ConfigAction,
},
Update {
id: String,
source: Option<PathBuf>,
target: Option<PathBuf>,
name: Option<String>,
},
Migrate {
id: String,
dest: Option<PathBuf>,
},
Metadata {
action: MetadataAction,
},
}Expand description
The Commands enum defines the various commands that the bonds CLI application supports. Each variant corresponds to a specific action that can be performed on the bonds, such as adding a new bond, listing existing bonds, updating bond information, and managing metadata. Some commands have their own subcommands for more granular actions, such as the Config and Metadata commands. This structure allows for a clear and organized command-line interface, making it easier for users to understand and use the available functionality of the CLI application.
Variants§
Add
Create a new bond from source to target
Fields
List
List all bonds
Info
Show details of a specific bond
Remove
Remove a bond
Fields
Config
View or modify configuration
Fields
action: ConfigActionUpdate
Update an existing bond’s source or target
Fields
Migrate
Move a bond’s target to a new directory
Fields
Metadata
Read or modify metadata for a bond
Fields
action: MetadataActionTrait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Commands
impl Subcommand for Commands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand