Enum usi::GuiCommand
source · [−]pub enum GuiCommand {
GameOver(GameOverKind),
Go(ThinkParams),
IsReady,
Ponderhit,
Position(String),
SetOption(String, Option<String>),
Stop,
Usi,
UsiNewGame,
Quit,
}
Expand description
Represents a USI command sent from the GUI.
Examples
use std::time::Duration;
use usi::{GuiCommand, ThinkParams};
let params = ThinkParams::new().btime(Duration::from_secs(1)).wtime(Duration::from_secs(2));
let cmd = GuiCommand::Go(params);
assert_eq!("go btime 1000 wtime 2000", cmd.to_string());
Variants
GameOver(GameOverKind)
Go(ThinkParams)
IsReady
Ponderhit
Position(String)
SetOption(String, Option<String>)
Stop
Usi
UsiNewGame
Quit
Trait Implementations
sourceimpl Clone for GuiCommand
impl Clone for GuiCommand
sourcefn clone(&self) -> GuiCommand
fn clone(&self) -> GuiCommand
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 GuiCommand
impl Debug for GuiCommand
sourceimpl Display for GuiCommand
impl Display for GuiCommand
sourceimpl Hash for GuiCommand
impl Hash for GuiCommand
sourceimpl PartialEq<GuiCommand> for GuiCommand
impl PartialEq<GuiCommand> for GuiCommand
sourcefn eq(&self, other: &GuiCommand) -> bool
fn eq(&self, other: &GuiCommand) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &GuiCommand) -> bool
fn ne(&self, other: &GuiCommand) -> bool
This method tests for !=
.
impl Eq for GuiCommand
impl StructuralEq for GuiCommand
impl StructuralPartialEq for GuiCommand
Auto Trait Implementations
impl RefUnwindSafe for GuiCommand
impl Send for GuiCommand
impl Sync for GuiCommand
impl Unpin for GuiCommand
impl UnwindSafe for GuiCommand
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