Struct pgn_reader::Reader
source · pub struct Reader<'a, 'pgn, V: Visitor<'pgn>>where
V: 'a,{ /* private fields */ }
Expand description
Reads a PGN.
Implementations
sourceimpl<'a, 'pgn, V: Visitor<'pgn>> Reader<'a, 'pgn, V>
impl<'a, 'pgn, V: Visitor<'pgn>> Reader<'a, 'pgn, V>
sourcepub fn new(visitor: &'a mut V, pgn: &'pgn [u8]) -> Reader<'a, 'pgn, V>
pub fn new(visitor: &'a mut V, pgn: &'pgn [u8]) -> Reader<'a, 'pgn, V>
Creates a new reader with a custom Visitor
.
sourcepub fn read_game(&mut self) -> Option<V::Result>
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.
sourcepub fn remaining_pgn(&self) -> &'pgn [u8]ⓘ
pub fn remaining_pgn(&self) -> &'pgn [u8]ⓘ
Returns a slice containing the not yet fully parsed games.
Trait Implementations
sourceimpl<'a, 'pgn, V: Visitor<'pgn>> IntoIterator for Reader<'a, 'pgn, V>
impl<'a, 'pgn, V: Visitor<'pgn>> IntoIterator for Reader<'a, 'pgn, V>
Auto Trait Implementations
impl<'a, 'pgn, V> RefUnwindSafe for Reader<'a, 'pgn, V>where
V: RefUnwindSafe,
impl<'a, 'pgn, V> Send for Reader<'a, 'pgn, V>where
V: Send,
impl<'a, 'pgn, V> Sync for Reader<'a, 'pgn, V>where
V: Sync,
impl<'a, 'pgn, V> Unpin for Reader<'a, 'pgn, V>
impl<'a, 'pgn, V> !UnwindSafe for Reader<'a, 'pgn, V>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more