Struct pgn_reader::Reader
[−]
[src]
pub struct Reader<'a, 'pgn, V: Visitor<'pgn>> where
V: 'a, { /* fields omitted */ }
Reads a PGN.
Methods
impl<'a, 'pgn, V: Visitor<'pgn>> Reader<'a, 'pgn, V>[src]
pub fn new(visitor: &'a mut V, pgn: &'pgn [u8]) -> Reader<'a, 'pgn, V>[src]
Creates a new reader with a custom Visitor.
pub fn read_game(&mut self) -> Option<V::Result>[src]
Read the next game, returning the result from the visitor, or None
if there was no further game.
pub fn skip_game(&mut self)[src]
Skip the next game without calling methods of the visitor.
pub fn read_all(self)[src]
Reads all games.
pub fn remaining_pgn(&self) -> &'pgn [u8][src]
Returns a slice containing the not yet fully parsed games.
Trait Implementations
impl<'a, 'pgn, V: Visitor<'pgn>> Debug for Reader<'a, 'pgn, V>[src]
fn fmt(&self, f: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more