Skip to main content

EngineAdapter

Trait EngineAdapter 

Source
pub trait EngineAdapter: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn stochastic(&self) -> bool;
    fn config_label(&self) -> String;
    fn select_raw(
        &self,
        bb: &Bitboard,
        seed: Option<u64>,
    ) -> Result<(Move, RawMetrics), String>;
}
Expand description

Uniform interface over the benchmarked engines.

Send + Sync supertrait bounds let run_agreement/run_head_to_head share adapter references across a rayon worker pool when workers > 1; every adapter is a stateless value type, so the bounds are automatic.

Required Methods§

Source

fn name(&self) -> &'static str

Source

fn stochastic(&self) -> bool

Source

fn config_label(&self) -> String

Source

fn select_raw( &self, bb: &Bitboard, seed: Option<u64>, ) -> Result<(Move, RawMetrics), String>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§