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
The option of type check (a boolean).
Fields
Spin
The option of type spin (a signed integer).
Fields
Combo
The option of type combo (a list of strings).
Fields
Button
The option of type button (an action).
String
The option of type string (a string, unsurprisingly).
Implementations§
Trait Implementations§
Source§impl Clone for UciOptionConfig
impl Clone for UciOptionConfig
Source§fn clone(&self) -> UciOptionConfig
fn clone(&self) -> UciOptionConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UciOptionConfig
impl Debug for UciOptionConfig
Source§impl Display for UciOptionConfig
impl Display for UciOptionConfig
impl Eq for UciOptionConfig
Source§impl Hash for UciOptionConfig
impl Hash for UciOptionConfig
Source§impl PartialEq for UciOptionConfig
impl PartialEq for UciOptionConfig
Source§impl Serializable for UciOptionConfig
impl Serializable for UciOptionConfig
Source§fn 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 StructuralPartialEq for UciOptionConfig
Auto Trait Implementations§
impl Freeze for UciOptionConfig
impl RefUnwindSafe for UciOptionConfig
impl Send for UciOptionConfig
impl Sync for UciOptionConfig
impl Unpin for UciOptionConfig
impl UnsafeUnpin for UciOptionConfig
impl UnwindSafe for UciOptionConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more