Expand description
The parser module contains the parse method that performs the parsing of UCI messages into their respective
UciMessage variants.
Behind the scenes, it uses the PEST parser. The corresponding PEG grammar is available here.
Enums§
Functions§
- parse
- Parses the specified
&str sinto a list ofUciMessages. Please note that this method will ignore any unrecognized messages, which is in-line with the recommendations of the UCI protocol specification. - parse_
one - Parses and returns a single message, with or without a terminating newline. Usually used
in a loop that reads a single line from an input stream, such as the stdin. Note that if the
message is unrecognizable to the parser, a
UciMessage::UnknownMessagevariant is returned. - parse_
strict - Parses the specified
&str sinto a list ofUciMessages. Please note that this method will return anErrorif any of the input violates the grammar rules. - parse_
with_ unknown - This is like
parse, except that it returns aUciMessage::UnknownMessagevariant if it does not recognize the message.