Struct retrosheet::Parser
[−]
[src]
pub struct Parser { /* fields omitted */ }
An event file parser for Retrosheet event files.
Methods
impl Parser
[src]
fn new() -> Parser
Creates a new parser instance.
fn reset(&mut self)
Resets the parser to the initial state.
fn parse(&mut self, bytes: &[u8]) -> Result<Vec<Game>, Error>
Parses an event file.
This returns a list of the games in the event file.
Arguments
- bytes - A stream of byte-data containing the entirety of the event file.
Errors
The parser expects the byte-data coming in to be a complete event file, so any bytes remaining are counted as an error. Any other errors are from invalid events.
Trait Implementations
impl Clone for Parser
[src]
fn clone(&self) -> Parser
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more