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();