[−][src]Function vampirc_uci::parser::parse_with_unknown
pub fn parse_with_unknown(s: &str) -> MessageList
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.
/// # Examples
use vampirc_uci::UciMessage; use vampirc_uci::parse_with_unknown; let messages = parse_with_unknown("not really a message\n"); assert_eq!(messages.len(), 1);