format_env 1.0.1

Substitutes environment variables into a string literal at compile time
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 7.61 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 255.11 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • GrantMoyer/format_env
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • GrantMoyer

Substitues environment variables into a string literal at compile time.

Example:

use format_env::format_env;
assert_eq!(format_env!("Name: $(CARGO_PKG_NAME), License: $(CARGO_PKG_LICENSE)"), "Name: format_env, License: MIT")
assert_eq!(format_env!("Name: $$(CARGO_PKG_NAME)"), "Name: $(CARGO_PKG_NAME)")