pub trait MoveSelector<S: PlanningSolution, M: Move<S>>: Send + Debug {
type Cursor<'a>: MoveCursor<S, M> + 'a
where Self: 'a;
// Required methods
fn open_cursor<'a, D: Director<S>>(
&'a self,
score_director: &D,
) -> Self::Cursor<'a>;
fn size<D: Director<S>>(&self, score_director: &D) -> usize;
// Provided methods
fn iter_moves<'a, D: Director<S>>(
&'a self,
score_director: &D,
) -> MoveSelectorIter<S, M, Self::Cursor<'a>> ⓘ { ... }
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 stable candidate indices plus borrowable
move views. Ownership is transferred only via take_candidate.
Required Associated Types§
type Cursor<'a>: MoveCursor<S, M> + 'a where Self: 'a
Required Methods§
fn open_cursor<'a, D: Director<S>>( &'a self, score_director: &D, ) -> Self::Cursor<'a>
fn size<D: Director<S>>(&self, score_director: &D) -> usize
Provided Methods§
fn iter_moves<'a, D: Director<S>>( &'a self, score_director: &D, ) -> MoveSelectorIter<S, M, Self::Cursor<'a>> ⓘ
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.