Enum usi::EngineCommand [−][src]
pub enum EngineCommand {
Id(IdParams),
BestMove(BestMoveParams),
Checkmate(CheckmateParams),
Info(Vec<InfoParams>),
Option(OptionParams),
ReadyOk,
UsiOk,
Unknown,
}
Expand description
Represents a USI command sent from the engine.
Examples
use usi::{EngineCommand, BestMoveParams};
let cmd = EngineCommand::parse("bestmove 7g7f ponder 8c8d").unwrap();
match cmd {
EngineCommand::BestMove(BestMoveParams::MakeMove(ref m, Some(ref pm))) => {
assert_eq!("7g7f", *m);
assert_eq!("8c8d", *pm);
},
_ => unreachable!(),
}
Variants
Id(IdParams)
Tuple Fields of Id
0: IdParams
BestMove(BestMoveParams)
Tuple Fields of BestMove
Checkmate(CheckmateParams)
Tuple Fields of Checkmate
Info(Vec<InfoParams>)
Tuple Fields of Info
0: Vec<InfoParams>
Option(OptionParams)
Tuple Fields of Option
0: OptionParams
Implementations
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for EngineCommand
impl Send for EngineCommand
impl Sync for EngineCommand
impl Unpin for EngineCommand
impl UnwindSafe for EngineCommand
Blanket Implementations
Mutably borrows from an owned value. Read more