whitespace-conf 1.0.0

Key-value configuration file delimited with whitespaces
Documentation
  • Coverage
  • 66.67%
    2 out of 3 items documented1 out of 2 items with examples
  • Size
  • Source code size: 15.00 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 167.85 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • pop-os/whitespace-conf
    2 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mmstick jackpot51

whitespace-conf

Rust library for parsing configuration files which are key-value pairs delimited by whitespace. Lines that start with # are ignored.

use std::fs;

fn main() {
    let string = fs::read_to_string("/etc/login.defs").unwrap();

    let defs = linux_login_defs::parse(&string);

    println!("UID_MIN = {:?}", defs.get("UID_MIN"));
    println!("UID_MAX = {:?}", defs.get("UID_MAX"));
}