[x] - NamedArg::key gives an easy "read this thing from the config" method
[x] - Parser::key behaves similar to Parser::fallback and gives "if not specified - try to use config"
[x] - how to pass config to the parser? Ended up implementing OptionParser::config_parser
want to be able to run tests or custom runs - use with OptionParser::run_inner
want to be able to specify config file name on a command line
[ ] - strictly typed config reader in addition to stringly typed? Generic parsers tend to produce an enumValue that can be one of String, f64, etc. should Config::get return a local version of that?
[ ] - how should a single key annotation on a field behave?
it can behave similarly to env and add a fallback to the config
it can behave like short/long and override the behavior making it easy to create pure config reader
[ ] - API documentation
[ ] - tutorial documentation
[ ] - instances of Config for a few formats? yaml/json/toml?
Implements #275
NamedArg::key
gives an easy "read this thing from the config" methodParser::key
behaves similar toParser::fallback
and gives "if not specified - try to use config"OptionParser::config_parser
OptionParser::run_inner
enum
Value
that can be one ofString
,f64
, etc. shouldConfig::get
return a local version of that?key
annotation on a field behave?env
and add a fallback to the configshort
/long
and override the behavior making it easy to create pure config readerConfig
for a few formats? yaml/json/toml?