[][src]Enum vampirc_uci::uci::UciInfoAttribute

pub enum UciInfoAttribute {
    Depth(u8),
    SelDepth(u8),
    Time(u64),
    Nodes(u64),
    Pv(Vec<UciMove>),
    MultiPv(u16),
    Score {
        cp: Option<i32>,
        mate: Option<i8>,
        lower_bound: Option<bool>,
        upper_bound: Option<bool>,
    },
    CurrMove(UciMove),
    CurrMoveNum(u16),
    HashFull(u16),
    Nps(u64),
    TbHits(u64),
    SbHits(u64),
    CpuLoad(u16),
    String(String),
    Refutation(Vec<UciMove>),
    CurrLine {
        cpu_nr: Option<u16>,
        line: Vec<UciMove>,
    },
    Any(StringString),
}

The representation of various info messages. For an info attribute that is not listed in the protocol specification, the UciInfoAttribute::Any(name, value) variant can be used.

Variants

Depth(u8)

The info depth message.

SelDepth(u8)

The info seldepth message.

Time(u64)

The info time message.

Nodes(u64)

The info nodes message.

The info pv message (best line move sequence).

MultiPv(u16)

The info pv ... multipv message (the pv line number in a multi pv sequence).

Score

The info score ... message.

Fields of Score

cp: Option<i32>

The score in centipawns.

mate: Option<i8>

Mate coming up in this many moves. Negative value means the engine is getting mated.

lower_bound: Option<bool>

The value sent is the lower bound.

upper_bound: Option<bool>

The value sent is the upper bound.

CurrMove(UciMove)

The info currmove message (current move).

CurrMoveNum(u16)

The info currmovenum message (current move number).

HashFull(u16)

The info hashfull message (the occupancy of hashing tables in permills).

Nps(u64)

The info nps message (nodes per second).

TbHits(u64)

The info tbhits message (end-game table-base hits).

SbHits(u64)

The info sbhits message (I guess some Shredder-specific end-game table-base stuff. I dunno, probably best to ignore).

CpuLoad(u16)

The info cpuload message (CPU load in permills).

String(String)

The info string message (a string the GUI should display).

Refutation(Vec<UciMove>)

The info refutation message (the first move is the move being refuted).

CurrLine

The info currline message (current line being calculated on a CPU).

Fields of CurrLine

cpu_nr: Option<u16>

The CPU number calculating this line.

line: Vec<UciMove>

The line being calculated.

Any(StringString)

Any other info line in the format (name, value).

Methods

impl UciInfoAttribute[src]

pub fn from_centipawns(cp: i32) -> UciInfoAttribute[src]

Creates a UciInfoAttribute::Score with the cp attribute set to the value of the parameter and all other fields set to None.

pub fn from_mate(mate: i8) -> UciInfoAttribute[src]

Creates a UciInfoAttribute::Score with the mate attribute set to the value of the parameter and all other fields set to None. A negative value indicates it is the engine that is getting mated.

pub fn get_name(&self) -> &str[src]

Returns the name of the info attribute.

Trait Implementations

impl Clone for UciInfoAttribute[src]

impl Debug for UciInfoAttribute[src]

impl Display for UciInfoAttribute[src]

impl Eq for UciInfoAttribute[src]

impl Hash for UciInfoAttribute[src]

impl PartialEq<UciInfoAttribute> for UciInfoAttribute[src]

impl Serializable for UciInfoAttribute[src]

fn serialize(&self) -> String[src]

Returns the attribute serialized as a String.

impl StructuralEq for UciInfoAttribute[src]

impl StructuralPartialEq for UciInfoAttribute[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.