Struct domain::master::bufscanner::BufScanner[][src]

pub struct BufScanner<R: Read> { /* fields omitted */ }

A scanner using a buffer atop a reader.

The strategy implemented for the buffer is to read byte by byte from the underlying reader and flush it every time a successfully read token ends at the buffer’s end (which should happen quite a lot). This may not be the smartest way of doing this, but it is simple and memory-efficient.

Methods

impl<R: Read> BufScanner<R>
[src]

Creates a new scanner using the given reader.

Creates a new scanner using the given reader and position.

The scanner will assume that the current position of reader corresponds to the human-friendly position pos.

impl BufScanner<File>
[src]

Attempts to opens a file and create a scanner for it.

impl<T: AsRef<[u8]>> BufScanner<Cursor<T>>
[src]

Wraps t into a cursor and creates a scanner with it.

Trait Implementations

impl<R: Clone + Read> Clone for BufScanner<R>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<R: Debug + Read> Debug for BufScanner<R>
[src]

Formats the value using the given formatter. Read more

impl<R: Read> Scanner for BufScanner<R>
[src]

Fundamental Methods Read more

Returns the current position of the scanner.

Scans a word token. Read more

Scans a quoted word. Read more

Scans a quoted word, processing the content characters separatedly. Read more

Scans phrase: a normal or quoted word. Read more

Scans a phrase, processing the content characters separatedly. Read more

Scans a newline. Read more

Scans a non-empty sequence of space. Read more

Scans a possibly empty sequence of space.

Skips over an entry. Read more

Scans a word, processing each character of its content separatedly. Read more

Scans a phrase and converts it into a string slice. Read more

Scans a phrase and returns a copy of it. Read more

Helper Methods Read more

Scans a phrase containing a 32 bit integer in decimal representation.

Scans a word containing a sequence of pairs of hex digits. Read more

Skips over the word with the content literal. Read more

Scans a domain name and returns an owned domain name. Read more

Scans a domain name into a bytes vec. Read more

Scans a character string and returns it as an owned value.

Scans a character string into a bytes vec. Read more

Auto Trait Implementations

impl<R> Send for BufScanner<R> where
    R: Send

impl<R> Sync for BufScanner<R> where
    R: Sync