Macro rust_decouple::config_vec

source ·
macro_rules! config_vec {
    ($var_name:expr, $default_value:expr) => { ... };
    ($var_name:expr) => { ... };
}
Expand description

Macro for Vector environment parser

§Usage

let variable: Vec<u8> = config!("VEC_U8_VAR");
let variable_with_default: Vec<i32> = config!("NOT_DEFINED_I32_VAR", vec![]);
// Automatically inferred that `variable_with_default_and_type_inferred` is u8 due to the default value
let variable_with_default_and_inferred_type = config!("VAR", vec![0u8]);