Struct parse_hosts::HostsFile
[−]
[src]
pub struct HostsFile<R: BufRead> { /* fields omitted */ }
Representation of /etc/hosts
.
Methods
impl HostsFile<BufReader<File>>
[src]
impl<R: Read> HostsFile<BufReader<R>>
[src]
fn read_buffered(reader: R) -> HostsFile<BufReader<R>>
[src]
Loads the data from /etc/hosts
from a generic reader wrapped in a BufReader
.
impl<R: BufRead> HostsFile<R>
[src]
fn read(reader: R) -> HostsFile<R>
[src]
Loads the data from /etc/hosts
from a generic reader.
fn lines(self) -> Lines<R>
[src]
Iterates over all lines in the file.
fn data_lines(self) -> DataLines<R>
[src]
Iterates over the lines in the file with data.
fn pairs(self) -> Pairs<R>
[src]
Iterates over the IP/host pairs in the file.