Expand description
A derive-based, highly composable env-and-argument parser aimed at the practically-minded web
developer building large web projects.
To use conf, use the #[derive(Conf)] proc macro on your configuration struct.
Then call a Conf trait function to parse your configuration struct.
Proc macro attributes are documented there.
See README for an overview.
Structs§
- Conf
Builder - A builder which collects config value sources for the parse.
- Conf
Serde Builder - A ConfBuilder which additionally has serde-document content installed.
- Error
- An error which occurs when a
Conf::parsefunction is called. This may conceptually represent many underlying errors of several different types.
Traits§
- Conf
- The Conf trait is implemented by types that represent a collection of config parsed on startup,
and is modeled on
clap::Parser. - Conf
Serde - Extension to Conf trait with serde-integration implementation details.
- Subcommands
- The Subcommands trait represents one or more subcommands that can be added to a
Confstructure. To use it, put#[derive(Subcommands)]on your enum, and then add a#[conf(subcommands)]field to yourConfstructure whose type is your enum type, orOption<T>.
Functions§
- find_
parameter - In some cases, you may want to grab a config file path from CLI args before doing the main parse, so that you can load the config file content and pass it to conf::conf_builder(), if the config file path was present.