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]
impl<'a, 'pgn, V: Visitor<'pgn>> Reader<'a, 'pgn, V>pub fn new(visitor: &'a mut V, pgn: &'pgn [u8]) -> Reader<'a, 'pgn, V>[src]
pub fn new(visitor: &'a mut V, pgn: &'pgn [u8]) -> Reader<'a, 'pgn, V>Creates a new reader with a custom Visitor.
pub fn read_game(&mut self) -> Option<V::Result>[src]
pub fn read_game(&mut self) -> Option<V::Result>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]
pub fn skip_game(&mut self)Skip the next game without calling methods of the visitor.
pub fn read_all(self)[src]
pub fn read_all(self)Reads all games.
pub fn remaining_pgn(&self) -> &'pgn [u8][src]
pub fn remaining_pgn(&self) -> &'pgn [u8]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]
impl<'a, 'pgn, V: Visitor<'pgn>> Debug for Reader<'a, 'pgn, V>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<'a, 'pgn, V: Visitor<'pgn>> IntoIterator for Reader<'a, 'pgn, V>[src]
impl<'a, 'pgn, V: Visitor<'pgn>> IntoIterator for Reader<'a, 'pgn, V>