Enum usi::EngineCommand
source · [−]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)
BestMove(BestMoveParams)
Checkmate(CheckmateParams)
Info(Vec<InfoParams>)
Option(OptionParams)
ReadyOk
UsiOk
Unknown
Implementations
sourceimpl EngineCommand
impl EngineCommand
Trait Implementations
sourceimpl Clone for EngineCommand
impl Clone for EngineCommand
sourcefn clone(&self) -> EngineCommand
fn clone(&self) -> EngineCommand
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for EngineCommand
impl Debug for EngineCommand
sourceimpl Hash for EngineCommand
impl Hash for EngineCommand
sourceimpl PartialEq<EngineCommand> for EngineCommand
impl PartialEq<EngineCommand> for EngineCommand
sourcefn eq(&self, other: &EngineCommand) -> bool
fn eq(&self, other: &EngineCommand) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &EngineCommand) -> bool
fn ne(&self, other: &EngineCommand) -> bool
This method tests for !=
.
impl Eq for EngineCommand
impl StructuralEq for EngineCommand
impl StructuralPartialEq for EngineCommand
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more