Skip to main content

parse_with_defaults

Function parse_with_defaults 

Source
pub fn parse_with_defaults<T: Parser>(tool: &str) -> T
Expand description

Parse the command line like T::parse(), applying [defaults] from the tool’s config layers (/etc/<tool>/config.toml, then ~/.config/<tool>/config.toml overriding it per key) for flags not given on the command line. Call with the tool’s crate name: parse_with_defaults::<Cli>(env!("CARGO_PKG_NAME")).