Struct weave::Parser [] [src]

pub struct Parser<S: Sink, B> { /* fields omitted */ }

A Parser is used to process a weave file, extracting either everything, or only a specific delta.

Methods

impl<S: Sink> Parser<S, BufReader<Box<Read>>>
[src]

Construct a parser, based on the main file of the naming convention.

impl<S: Sink, B: BufRead> Parser<S, B>
[src]

Construct a new Parser, reading from the given Reader, giving records to the given Sink, and aiming for the specified delta. This is not the intended constructor, normal users should use new. (This is public, for testing).

Run the parser until we either reach the given line number, or the end of the weave. Lines are numbered from 1, so calling with a lineno of zero will run the parser until the end of the input. Returns Ok(0) for the end of input, Ok(n) for stopping at line n (which should always be the same as the passed in lineno, or Err if there is an error.

Get the header read from this weave file.

Consume the parser, returning the header.

Get a copy of the sink.