pub struct Config {
pub input: String,
pub global: GlobalConfig,
pub generators: HashMap<GeneratorType, Table>,
}Expand description
Unified configuration structure that works for both file and CLI configs
Fields§
§input: StringInput file path (CLI only)
global: GlobalConfigGlobal settings
generators: HashMap<GeneratorType, Table>Generator-specific configurations stored as TOML tables
Implementations§
Source§impl Config
impl Config
Sourcepub fn load(cli_args: &CliArgs) -> Result<Self, ConfigError>
pub fn load(cli_args: &CliArgs) -> Result<Self, ConfigError>
Load configuration from CLI arguments and file system
This method handles:
- Loading config file from specified path or auto-discovery
- Parsing generator config overrides from CLI
- Merging all configurations with proper precedence
Precedence: CLI overrides > CLI global args > Env vars > Config file > Defaults
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more