pub enum Reversibility {
Reversible,
Irreversible,
}Expand description
Declares whether a dispatch transition may be undone.
Pass as the second argument to Engine::dispatch. The compiler enforces
that callers cannot omit this declaration — there is no default.
§Usage
use herdingcats::Reversibility;
// A normal game move the player can undo:
let _ = Reversibility::Reversible;
// A dice roll or randomised event that permanently advances history:
let _ = Reversibility::Irreversible;Variants§
Reversible
This transition can be undone via Engine::undo.
Irreversible
This transition is irreversible; committing it clears all undo/redo history.
Trait Implementations§
Source§impl Clone for Reversibility
impl Clone for Reversibility
Source§fn clone(&self) -> Reversibility
fn clone(&self) -> Reversibility
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Reversibility
impl Debug for Reversibility
Source§impl PartialEq for Reversibility
impl PartialEq for Reversibility
impl Copy for Reversibility
impl Eq for Reversibility
impl StructuralPartialEq for Reversibility
Auto Trait Implementations§
impl Freeze for Reversibility
impl RefUnwindSafe for Reversibility
impl Send for Reversibility
impl Sync for Reversibility
impl Unpin for Reversibility
impl UnsafeUnpin for Reversibility
impl UnwindSafe for Reversibility
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