netrc_util 0.1.0

A simple libary for parsing netrc files
Documentation
  • Coverage
  • 87.5%
    14 out of 16 items documented1 out of 14 items with examples
  • Size
  • Source code size: 32.49 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.4 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 33s Average build duration of successful builds.
  • all releases: 33s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • nils-degroot

netrc_util

A simple libary for parsing netrc files.

Usage

use netrc_util::{Host, NetrcParser};

fn main() {
    let netrc_content = "machine sample.test login user password pass";
    let host = Host::parse("sample.test").unwrap();

    let entry = NetrcParser::new(netrc_content).entry_for_host(&host).unwrap().unwrap();

    assert_eq!(entry.login(), Some("login"));
    assert_eq!(entry.password(), Some("pass"));
}