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.
parse | Parses the specified &str s into a list of UciMessage s. Please note that this method will ignore any
unrecognized messages, which is in-line with the recommendations of the UCI protocol specification.
|
parse_strict | Parses the specified &str s into a list of UciMessage s. Please note that this method will return an Error if
any of the input violates the grammar rules.
|
parse_with_unknown | This is like parse , except that it returns a UciMessage::UnknownMessage variant if it does not recognize the
message. Best use with a single message, since only one UnknownMessage can be returned.
|