[−][src]Trait pgn_reader::Visitor
Consumes games from a reader.
Associated Types
type Result
Value produced by the visitor after reading a game.
Required methods
Loading content...Provided methods
fn begin_game(&mut self)
Called at the start of the game.
fn begin_headers(&mut self)
Called directly before reading game headers.
fn header(&mut self, _key: &[u8], _value: RawHeader)
Called when parsing a game header like [White "Deep Blue"]
.
fn end_headers(&mut self) -> Skip
Called after reading the headers of a game. May skip quickly over
the following move text directly to
end_game()
.
fn san(&mut self, _san_plus: SanPlus)
Called for each move, like Nf3+
.
fn nag(&mut self, _nag: Nag)
Called for each numeric annotation glyph like !?
or $7
.
fn comment(&mut self, _comment: RawComment)
Called for each { comment }
.
fn begin_variation(&mut self) -> Skip
Called for each (
. May skip over the following variation directly
to end_variation()
(or to
end_game()
if no matching )
follows before the end of the game.
fn end_variation(&mut self)
Called for each )
. It is not guaranteed that there was a
matching (
.
fn outcome(&mut self, _outcome: Option<Outcome>)
Called for each game termination, like *
or 1-0
.