Enum vampirc_uci::uci::UciOptionConfig
source · [−]pub enum UciOptionConfig {
Check {
name: String,
default: Option<bool>,
},
Spin {
name: String,
default: Option<i64>,
min: Option<i64>,
max: Option<i64>,
},
Combo {
name: String,
default: Option<String>,
var: Vec<String>,
},
Button {
name: String,
},
String {
name: String,
default: Option<String>,
},
}
Expand description
Represents a UCI option definition.
Variants
Check
Fields
name: String
The name of the option.
The option of type check
(a boolean).
Spin
Fields
name: String
The name of the option.
The option of type spin
(a signed integer).
Combo
Fields
name: String
The name of the option.
The option of type combo
(a list of strings).
Button
Fields
name: String
The name of the option.
The option of type button
(an action).
String
Fields
name: String
The name of the option.
The option of type string
(a string, unsurprisingly).
Implementations
Trait Implementations
sourceimpl Clone for UciOptionConfig
impl Clone for UciOptionConfig
sourcefn clone(&self) -> UciOptionConfig
fn clone(&self) -> UciOptionConfig
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 UciOptionConfig
impl Debug for UciOptionConfig
sourceimpl Display for UciOptionConfig
impl Display for UciOptionConfig
sourceimpl Hash for UciOptionConfig
impl Hash for UciOptionConfig
sourceimpl PartialEq<UciOptionConfig> for UciOptionConfig
impl PartialEq<UciOptionConfig> for UciOptionConfig
sourcefn eq(&self, other: &UciOptionConfig) -> bool
fn eq(&self, other: &UciOptionConfig) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &UciOptionConfig) -> bool
fn ne(&self, other: &UciOptionConfig) -> bool
This method tests for !=
.
sourceimpl Serializable for UciOptionConfig
impl Serializable for UciOptionConfig
sourcefn serialize(&self) -> String
fn serialize(&self) -> String
Serializes this option config into a full UCI message string.
Examples
use vampirc_uci::{UciMessage, UciOptionConfig, Serializable};
let m = UciMessage::Option(UciOptionConfig::Check {
name: String::from("Nullmove"),
default: Some(true)
});
assert_eq!(m.serialize(), "option name Nullmove type check default true");
impl Eq for UciOptionConfig
impl StructuralEq for UciOptionConfig
impl StructuralPartialEq for UciOptionConfig
Auto Trait Implementations
impl RefUnwindSafe for UciOptionConfig
impl Send for UciOptionConfig
impl Sync for UciOptionConfig
impl Unpin for UciOptionConfig
impl UnwindSafe for UciOptionConfig
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more