env_extract env_extract is a Rust library that provides a convenient way to extract environment variables into a more usable format. It is particularly useful for extracting environment variables into enums.
Usage To use env_extract, add it as a dependency in your Cargo.toml file:
[]
= "0.1.0"
Then, you can import the necessary types from the env_extract crate into your Rust code:
use ;
Examples Here are a couple of examples to demonstrate how to use env_extract:
Extracting an Enum Environment Variable
use EnumVariableBuilder;
set_var;
let foo = default
.name
.add_option
.add_option
.build
.unwrap;
assert!;
Extracting Any Environment Variable
use AnyVariableBuilder;
set_var;
let foo = default
.name
.build
.unwrap;
assert_eq!;
Crate Features None For more details and additional options, please refer to the full documentation.
License This crate is distributed under the terms of the MIT license.
Please feel free to contribute by opening issues or submitting pull requests on the GitHub repository.
If you have any questions or need further assistance, don't hesitate to reach out.
Enjoy using env_extract!