pub struct TurnTransition;Expand description
Pure resolver mapping (TurnState, TurnOutcome) → TurnAction.
This function encodes the complete control-flow logic. It is stateless and can be tested exhaustively without the runtime.
Implementations§
Source§impl TurnTransition
impl TurnTransition
Sourcepub fn resolve(state: TurnState, outcome: &TurnOutcome) -> TurnAction
pub fn resolve(state: TurnState, outcome: &TurnOutcome) -> TurnAction
Resolves the next action given the current state and outcome.
Sourcepub fn status_for(state: TurnState) -> RunStatus
pub fn status_for(state: TurnState) -> RunStatus
Derives the RunStatus implied by a given turn state.
Auto Trait Implementations§
impl Freeze for TurnTransition
impl RefUnwindSafe for TurnTransition
impl Send for TurnTransition
impl Sync for TurnTransition
impl Unpin for TurnTransition
impl UnsafeUnpin for TurnTransition
impl UnwindSafe for TurnTransition
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