Crate netrc

source ·
Expand description

The netrc crate provides a parser for the netrc file.

The reqwest-netrc crate adds the support of netrc to the reqwest crate via the reqwest-middleware wrapper.

Setup

$ crago add rust-netrc

Example

use netrc::Netrc;

// ...

let nrc = Netrc::new().unwrap();

// ...
println!(
    "login = {}\naccount = {}\npassword = {}",
    nrc.hosts["my.host"].login,
    nrc.hosts["my.host"].account,
    nrc.hosts["my.host"].password,
);

Structs

Enums

  • An error that can occur when processing a Netrc file.

Type Aliases