Cornetto 🥐

A crate to combine config loading and CLI arg parsing with structops. Having a more generic solution (like a custom crate providing a handy custom macro) to load parameters (as a Rust struct) with this precedence: CLI args / ENV variables / CONFIG file values.

```rust use cornetto::Cornetto;

[allow(dead_code)]

[derive(Cornetto)]

struct Test { #[cornetto(mut, 200)] // mutable on test ( reset(args...) ) pub price: u64, #[cornetto(const, 150)] // always const pub constprice: u64, #[cornetto(mut, "youhouhou")] pub strin: String, }

fn main() { println!("{}", TEST.price() == 200); println!("{}", TEST.const_price() == 150); println!("{}", TEST.strin().eq("youhouhou")); // true, true and true }

[cfg(test)]

mod test { #[test] fn testcornetto() { super::TEST.price(); asserteq!(super::TEST.price(), 200); super::TEST.reset(100, "ho ho ho".tostring()); // only accessible from tests assert_eq!(super::TEST.price(), 100); } } ```