use std::collections::HashMap; use salak::wrapper::NonEmptyVec; use salak::*; #[derive(FromEnvironment, Debug)] #[salak(prefix = "salak")] struct Config { #[salak(default = "world")] hello: String, world: Option, #[salak(name = "hello")] hey: Option, #[salak(default = 123)] num: u8, arr: Vec, #[salak(desc = "Non empty u8")] brr: NonEmptyVec, #[salak(desc = "map desc")] map: HashMap, } fn main() -> Result<(), PropertyError> { env_logger::init(); let env = Salak::builder() .configure_description::() .configure_args(app_info!()) .register_default_resource::<()>()? .build()?; for _i in 0..1000 { log::info!("Round {}", _i); let _ = env.get_resource::<()>()?; } Ok(()) }