oa::Cli
Command-line configuration with YAML + argv precedence. Type parameter C is any config struct that implements Default. Defaults are the base layer; a YAML file loaded via -c/--config overrides them; explicit argv flags override those. YAML support YAML loading is the caller’s responsibility. Pass a loader closure to Cli::parse_args_with_yaml to apply YAML fields before argv parsing when a -c/--config path is present.
Declaration
pub struct Cli<C> { /* private fields */ }Public Rust declaration.
Public Methods
pub fn add_option<T, F>(&mut self, names: &str, field: F, description: &str)where T: ParseCliValue + 'static, F: Fn(&mut C) -> &mut T + Clone + 'static,pub fn add_flag<F>(&mut self, names: &str, field: F, description: &str)where F: Fn(&mut C, bool) + Clone + 'static,pub fn add_multi<F>(&mut self, names: &str, field: F, description: &str)where F: Fn(&mut C) -> &mut Vec<String> + Clone + 'static,pub fn add_positional<T, F>( &mut self, name: &str, field: F, description: &str, required: bool, )where T: ParseCliValue + 'static, F: Fn(&mut C) -> &mut T + Clone + 'static,Associated Functions
Public Method Documentation
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.
No public source comment is attached to this declaration.