Struct netrc::Netrc [] [src]

pub struct Netrc {
    pub hosts: Vec<Host>,
    pub default: Option<Machine>,
    pub macros: Vec<Macro>,
}

Fields

hosts
default
macros

Methods

impl Netrc

fn parse<A: BufRead>(buf: A) -> Result<Netrc>

Parse a Netrc object from byte stream.

Examples

use netrc::Netrc;
use std::io::Cursor;

let input: Cursor<&[u8]> =
  Cursor::new(b"machine example.com login foo password bar");
let netrc = Netrc::parse(input).unwrap();

Trait Implementations

Derived Implementations

impl Default for Netrc

fn default() -> Netrc

impl Debug for Netrc

fn fmt(&self, __arg_0: &mut Formatter) -> Result