[−][src]Enum vampirc_uci::uci::UciMessage
An enumeration type containing representations for all messages supported by the UCI protocol.
Variants
The uci
engine-bound message.
Debug(bool)
The debug
engine-bound message. Its internal property specifies whether debug mode should be enabled (true
),
or disabled (false
).
The isready
engine-bound message.
The register
engine-bound message.
Fields of Register
The position
engine-bound message.
Fields of Position
The setoption
engine-bound message.
Fields of SetOption
The ucinewgame
engine-bound message.
The stop
engine-bound message.
The ponderhit
engine-bound message.
The quit
engine-bound message.
The go
engine-bound message.
Fields of Go
time_control: Option<UciTimeControl>
Time-control-related go
parameters (sub-commands).
search_control: Option<UciSearchControl>
Search-related go
parameters (sub-commands).
The id
GUI-bound message.
Fields of Id
The uciok
GUI-bound message.
The readyok
GUI-bound message.
The bestmove
GUI-bound message.
Fields of BestMove
CopyProtection(ProtectionState)
The copyprotection
GUI-bound message.
Registration(ProtectionState)
The registration
GUI-bound message.
Option(UciOptionConfig)
The option
GUI-bound message.
Info(Vec<UciInfoAttribute>)
The info
GUI-bound message.
Indicating unknown message.
Implementations
impl UciMessage
[src]
pub fn register_later() -> UciMessage
[src]
Constructs a register later
UciMessage::Register message.
pub fn register_code(name: &str, code: &str) -> UciMessage
[src]
Constructs a register <code> <name>
UciMessage::Register message.
pub fn go() -> UciMessage
[src]
Constructs an empty UciMessage::Register message.
pub fn go_ponder() -> UciMessage
[src]
Construct a go ponder
UciMessage::Register message.
pub fn go_infinite() -> UciMessage
[src]
Constructs a go infinite
UciMessage::Register message.
pub fn go_movetime(milliseconds: Duration) -> UciMessage
[src]
Constructs a go movetime <milliseconds>
UciMessage::Register message, with
milliseconds
as the argument.
pub fn id_name(name: &str) -> UciMessage
[src]
Constructs an id <name>
GUI-bound message.
pub fn id_author(author: &str) -> UciMessage
[src]
Constructs an id <name>
GUI-bound message.
pub fn best_move(best_move: UciMove) -> UciMessage
[src]
Constructs a bestmove
GUI-bound message without the ponder move.
pub fn best_move_with_ponder(best_move: UciMove, ponder: UciMove) -> UciMessage
[src]
Constructs a bestmove
GUI-bound message with the ponder move.
pub fn info_string(s: String) -> UciMessage
[src]
Constructs an info string ...
message.
pub fn direction(&self) -> CommunicationDirection
[src]
Returns whether the command was meant for the engine or for the GUI.
pub fn as_bool(&self) -> Option<bool>
[src]
If this UciMessage
is a UciMessage::SetOption
and the value of that option is a bool
, this method returns
the bool
value, otherwise it returns None
.
pub fn as_i32(&self) -> Option<i32>
[src]
If this UciMessage
is a UciMessage::SetOption
and the value of that option is an integer, this method
returns the i32
value of the integer, otherwise it returns None
.
pub fn is_unknown(&self) -> bool
[src]
Return true
if this UciMessage
is of variant UnknownMessage
.
Trait Implementations
impl AsRef<UciMessage> for ByteVecUciMessage
[src]
fn as_ref(&self) -> &UciMessage
[src]
impl Clone for UciMessage
[src]
fn clone(&self) -> UciMessage
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for UciMessage
[src]
impl Display for UciMessage
[src]
impl Eq for UciMessage
[src]
impl From<UciMessage> for ByteVecUciMessage
[src]
fn from(m: UciMessage) -> Self
[src]
impl Hash for UciMessage
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Into<UciMessage> for ByteVecUciMessage
[src]
fn into(self) -> UciMessage
[src]
impl PartialEq<UciMessage> for UciMessage
[src]
fn eq(&self, other: &UciMessage) -> bool
[src]
fn ne(&self, other: &UciMessage) -> bool
[src]
impl Serializable for UciMessage
[src]
fn serialize(&self) -> String
[src]
Serializes the command into a String.
Examples
use vampirc_uci::{UciMessage, Serializable}; println!("{}", UciMessage::Uci.serialize()); // Should print `uci`.
impl StructuralEq for UciMessage
[src]
impl StructuralPartialEq for UciMessage
[src]
Auto Trait Implementations
impl RefUnwindSafe for UciMessage
impl Send for UciMessage
impl Sync for UciMessage
impl Unpin for UciMessage
impl UnwindSafe for UciMessage
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,