pub trait MoveSelector<S: PlanningSolution, M: Move<S>>: Send + Debug {
// Required methods
fn iter_moves<'a, D: Director<S>>(
&'a self,
score_director: &'a D,
) -> impl Iterator<Item = M> + 'a;
fn size<D: Director<S>>(&self, score_director: &D) -> usize;
// Provided methods
fn append_moves<D: Director<S>>(
&self,
score_director: &D,
arena: &mut MoveArena<M>,
) { ... }
fn is_never_ending(&self) -> bool { ... }
}Expand description
A typed move selector that yields moves of type M directly.
Unlike erased selectors, this returns concrete moves inline, eliminating heap allocation per move.
§Type Parameters
S- The planning solution typeM- The move type
Required Methods§
fn iter_moves<'a, D: Director<S>>( &'a self, score_director: &'a D, ) -> impl Iterator<Item = M> + 'a
fn size<D: Director<S>>(&self, score_director: &D) -> usize
Provided Methods§
fn append_moves<D: Director<S>>( &self, score_director: &D, arena: &mut MoveArena<M>, )
fn is_never_ending(&self) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.