Skip to main content

GardenOptions

Trait GardenOptions 

Source
pub trait GardenOptions {
    // Required methods
    fn get_chdir(&self) -> &Option<PathBuf>;
    fn get_color_mut(&mut self) -> &mut ColorMode;
    fn get_config(&self) -> &Option<PathBuf>;
    fn set_config(&mut self, path: PathBuf);
    fn get_debug(&self) -> &[String];
    fn get_root(&self) -> &Option<PathBuf>;
    fn set_root(&mut self, path: PathBuf);

    // Provided methods
    fn update(&mut self) { ... }
    fn debug_level(&self, name: &str) -> u8 { ... }
}
Expand description

Garden command-line options that are common to all commands and typically specified before sub-command options and arguments.

Required Methods§

Source

fn get_chdir(&self) -> &Option<PathBuf>

Source

fn get_color_mut(&mut self) -> &mut ColorMode

Source

fn get_config(&self) -> &Option<PathBuf>

Source

fn set_config(&mut self, path: PathBuf)

Source

fn get_debug(&self) -> &[String]

Source

fn get_root(&self) -> &Option<PathBuf>

Source

fn set_root(&mut self, path: PathBuf)

Provided Methods§

Source

fn update(&mut self)

Update the initial state to handle chdir() and making arguments absolute.

Source

fn debug_level(&self, name: &str) -> u8

Return the debug level for the given name.

Implementors§