pub trait Visitor {
type Result;
// Required method
fn end_game(&mut self) -> Self::Result;
// Provided methods
fn begin_game(&mut self) { ... }
fn begin_headers(&mut self) { ... }
fn header(&mut self, _key: &[u8], _value: RawHeader<'_>) { ... }
fn end_headers(&mut self) -> Skip { ... }
fn san(&mut self, _san_plus: SanPlus) { ... }
fn nag(&mut self, _nag: Nag) { ... }
fn comment(&mut self, _comment: RawComment<'_>) { ... }
fn begin_variation(&mut self) -> Skip { ... }
fn end_variation(&mut self) { ... }
fn outcome(&mut self, _outcome: Option<Outcome>) { ... }
}Expand description
Consumes games from a reader.

Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn begin_game(&mut self)
fn begin_game(&mut self)
Called at the start of the game.
Sourcefn begin_headers(&mut self)
fn begin_headers(&mut self)
Called directly before reading game headers.
Sourcefn header(&mut self, _key: &[u8], _value: RawHeader<'_>)
fn header(&mut self, _key: &[u8], _value: RawHeader<'_>)
Called when parsing a game header like [White "Deep Blue"].
Sourcefn end_headers(&mut self) -> Skip
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().
Sourcefn comment(&mut self, _comment: RawComment<'_>)
fn comment(&mut self, _comment: RawComment<'_>)
Called for each { comment }.
Sourcefn begin_variation(&mut self) -> Skip
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.
Sourcefn end_variation(&mut self)
fn end_variation(&mut self)
Called for each ). It is not guaranteed that there was a
matching (.