use-env-var 0.0.1

Environment variable primitives for RustUse CLI-adjacent code
Documentation
  • Coverage
  • 93.1%
    27 out of 29 items documented1 out of 19 items with examples
  • Size
  • Source code size: 12.27 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 734.76 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 6s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-cli
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-env-var

Environment variable primitives for RustUse CLI-adjacent code.

This crate validates environment variable names and wraps safe reads from std::env. It does not provide a global configuration system, cache, mutation API, or process-wide runtime.

Example

use use_env_var::{EnvVarName, is_valid_env_var_name};

let name = EnvVarName::new("RUST_LOG")?;

assert_eq!(name.as_str(), "RUST_LOG");
assert!(is_valid_env_var_name("RUST_LOG"));
# Ok::<(), use_env_var::EnvVarNameError>(())

Scope

Use this crate when a library needs stable env var vocabulary without owning configuration policy.