env_cast!() { /* proc-macro */ }
Expand description
Reads an environment variable just like env!("XXX")
, but parses it into a specific type.
ยงExample
use env_cast::env_cast;
let PKG_MAJOR: u32 = env_cast!("CARGO_PKG_VERSION_MAJOR" as u32);
env_cast!() { /* proc-macro */ }
Reads an environment variable just like env!("XXX")
, but parses it into a specific type.
use env_cast::env_cast;
let PKG_MAJOR: u32 = env_cast!("CARGO_PKG_VERSION_MAJOR" as u32);