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§
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>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".