env_id
Use environment variables as identifiers.
Usage
Add env_id
to your project by running cargo add
:
cargo add env_id
Examples
let env_id! = 1;
dbg!;
Or you can provide a default value:
let env_id! = 1;
dbg!;
This may be useful when you want to let users specify the name of a public item, but the following code doesn't compile:
pub const env_id!: usize = 1;
You can use another macro to do the same thing:
env_id!;
License
Copyright (C) 2023 MaxXing. Licensed under either of Apache 2.0 or MIT at your option.