use-config-value 0.1.0

Primitive deterministic configuration value representation for RustUse
Documentation
  • Coverage
  • 100%
    15 out of 15 items documented1 out of 8 items with examples
  • Size
  • Source code size: 8.83 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 383.16 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
  • RustUse/use-config
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-config-value

Primitive deterministic configuration value representation.

use-config-value provides a small ConfigValue enum for nulls, booleans, integers, floats, strings, lists, and maps. Maps use BTreeMap so key order is deterministic.

use std::collections::BTreeMap;
use use_config_value::ConfigValue;

let mut values = BTreeMap::new();
values.insert("port".to_owned(), ConfigValue::from(8080_i64));

let value = ConfigValue::from(values);

assert_eq!(value.as_map().unwrap()["port"].as_i64(), Some(8080));

This crate does not serialize, deserialize, or depend on serde.