pub struct ActionFlags {
pub dry_run: bool,
pub verbose: bool,
}Expand description
Defines common command-line flags that can be reused across multiple mutating commands in the bonds CLI application. The dry_run flag allows users to preview the outcome of a command without making any actual changes to the filesystem or database, which is useful for testing and verification. The verbose flag enables the printing of extra execution details, providing users with more insight into what the command is doing, which can be helpful for debugging and inspection purposes. By centralizing these flags in a single struct, we can maintain consistency and reduce redundancy across different commands that perform mutations.
Fields§
§dry_run: boolPreview outcome without applying filesystem/database changes.
verbose: boolPrint extra execution details for debugging/inspection.
Trait Implementations§
Source§impl Args for ActionFlags
impl Args for ActionFlags
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl Clone for ActionFlags
impl Clone for ActionFlags
Source§fn clone(&self) -> ActionFlags
fn clone(&self) -> ActionFlags
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 ActionFlags
impl Debug for ActionFlags
Source§impl Default for ActionFlags
impl Default for ActionFlags
Source§fn default() -> ActionFlags
fn default() -> ActionFlags
Returns the “default value” for a type. Read more
Source§impl FromArgMatches for ActionFlags
impl FromArgMatches for ActionFlags
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>
Assign values from
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Auto Trait Implementations§
impl Freeze for ActionFlags
impl RefUnwindSafe for ActionFlags
impl Send for ActionFlags
impl Sync for ActionFlags
impl Unpin for ActionFlags
impl UnsafeUnpin for ActionFlags
impl UnwindSafe for ActionFlags
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