pub struct CompositeMove<S, M1, M2>{ /* private fields */ }Expand description
A move that applies two moves in sequence via arena indices.
The moves live in separate arenas. CompositeMove stores the indices and arena references needed to execute both moves.
§Type Parameters
S- The planning solution typeM1- The first move typeM2- The second move type
Implementations§
Source§impl<S, M1, M2> CompositeMove<S, M1, M2>
impl<S, M1, M2> CompositeMove<S, M1, M2>
Sourcepub fn new(index_1: usize, index_2: usize) -> Self
pub fn new(index_1: usize, index_2: usize) -> Self
Creates a new composite move from two arena indices.
Sourcepub fn is_doable_with_arenas<D: ScoreDirector<S>>(
&self,
arena_1: &MoveArena<M1>,
arena_2: &MoveArena<M2>,
score_director: &D,
) -> bool
pub fn is_doable_with_arenas<D: ScoreDirector<S>>( &self, arena_1: &MoveArena<M1>, arena_2: &MoveArena<M2>, score_director: &D, ) -> bool
Checks if this composite move is doable given both arenas.
Sourcepub fn do_move_with_arenas<D: ScoreDirector<S>>(
&self,
arena_1: &MoveArena<M1>,
arena_2: &MoveArena<M2>,
score_director: &mut D,
)
pub fn do_move_with_arenas<D: ScoreDirector<S>>( &self, arena_1: &MoveArena<M1>, arena_2: &MoveArena<M2>, score_director: &mut D, )
Executes both moves using the arenas.
Trait Implementations§
Source§impl<S, M1, M2> Clone for CompositeMove<S, M1, M2>
impl<S, M1, M2> Clone for CompositeMove<S, M1, M2>
Source§impl<S, M1, M2> Debug for CompositeMove<S, M1, M2>
impl<S, M1, M2> Debug for CompositeMove<S, M1, M2>
impl<S, M1, M2> Copy for CompositeMove<S, M1, M2>
Auto Trait Implementations§
impl<S, M1, M2> Freeze for CompositeMove<S, M1, M2>
impl<S, M1, M2> RefUnwindSafe for CompositeMove<S, M1, M2>
impl<S, M1, M2> Send for CompositeMove<S, M1, M2>
impl<S, M1, M2> Sync for CompositeMove<S, M1, M2>
impl<S, M1, M2> Unpin for CompositeMove<S, M1, M2>
impl<S, M1, M2> UnwindSafe for CompositeMove<S, M1, M2>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more