Expand description
§Env Var Helpers
X | Twitch | Youtube | Mastodon | GitHub | GitHub Sponsors
Macros and functions that help provide access to environment variable values.
use env_var_helpers::cargo::crates::*;
println!("{}\n", cargo_env());
println!("{}\n", cargo_pkg_version_env());
println!("{}\n", cargo_pkg_name_env());
println!("{}\n", cargo_pkg_readme_env());
§Compiler:
Build with the latest stable compiler.
§Todo:
- Add more documentation
- Add more functions
§Coding Style
This project uses a coding style the emphasises the use of white space over keeping the line and column counts as low as possible.
So this:
fn bar() {}
fn foo()
{
bar();
}
Not this:
fn bar() {}
fn foo()
{
bar();
}
§License
Licensed under either of:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0 (see also: https://www.tldrlegal.com/license/apache-license-2-0-apache-2-0))
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT (see also: https://www.tldrlegal.com/license/mit-license))
at your discretion
§Contributing
Please clone the repository and create an issue explaining what feature or features you’d like to add or bug or bugs you’d like to fix and perhaps how you intend to implement these additions or fixes. Try to include details though it doesn’t need to be exhaustive and we’ll take it from there (dependant on availability).
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Modules§
- cargo
- Sub-modules for dealing with cargo environment variables.
Macros§
- impl_
env_ accessor - Creates a function that calls the env macro on the provided env_variable_name parameter returning its value.
- impl_
env_ accessor_ pair - Creates a function that calls the env macro on the provided env_variable_name parameter returning the stringafied env_variable_name and the environment variable value in a tuple.