twelf
twelf copied to clipboard
Twelf is a configuration solution for Rust including 12-Factor support. It is designed with layers in order to configure different sources and formats to build your configuration. The main goal is to...
Let's consider the following test: ```rust #[test] fn mixed_clap_flatten_defaults() { #[config] #[derive(Parser, Debug, Default)] #[clap(author, version, about, long_about = None)] struct Conf { #[clap(flatten)] package: Package, } #[derive(Args, Default, Debug,...
This code doesn't compile: ``` #[config] #[derive(Parser, Debug, Default)] pub struct FrameworkConfig where AppArgsT: clap::Args + Clone + Sync + Send + std::fmt::Debug + Default + DeserializeOwned + Serialize {...
The following code won't compile: ``` #[config] #[derive(clap::Parser, Debug, Default)] pub struct FrameworkConfig { #[command(flatten)] #[serde(skip)] pub app_args: AppArgsT, #[serde(rename = "scratchPath")] pub scratch_path: Option, } ``` I get the...