Struct async_uci::engine::Engine

source ·
pub struct Engine { /* private fields */ }
Expand description

Engine can be created to spawn any Chess Engine that implements the UCI Protocol

Trait Implementations§

source§

impl ChessEngine for Engine

source§

fn new<'life0, 'async_trait>( exe_path: &'life0 str ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Create new engine from executable
source§

fn start_uci<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Start the UCI Protocol
source§

fn new_game<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Notify engine of new game start
source§

fn set_position<'life0, 'life1, 'async_trait>( &'life0 mut self, fen: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Notify engine of new position to search
source§

fn go_infinite<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Notify engine to search for best move until explicitly stopped
source§

fn go_depth<'life0, 'async_trait>( &'life0 mut self, depth: usize ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Notify engine to search for best move to a certain depth
source§

fn go_time<'life0, 'async_trait>( &'life0 mut self, ms: usize ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Notify engine to search for best move for a set time
source§

fn go_mate<'life0, 'async_trait>( &'life0 mut self, mate_in: usize ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Notify engine to search for a mate in a certain number of moves
source§

fn stop<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Notify engine to stop current search
source§

fn get_evaluation<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Option<Evaluation>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Retrieve the latest evaluation from the engine
source§

fn get_options<'life0, 'async_trait>( &'life0 mut self ) -> Pin<Box<dyn Future<Output = Result<Vec<EngineOption>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Retrieve the list of available options from the engine
source§

fn set_option<'life0, 'async_trait>( &'life0 mut self, option: String, value: String ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Set an option in the engine

Auto Trait Implementations§

§

impl !RefUnwindSafe for Engine

§

impl Send for Engine

§

impl Sync for Engine

§

impl Unpin for Engine

§

impl !UnwindSafe for Engine

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.