Struct aper::data_structures::Counter
source · pub struct Counter { /* private fields */ }
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Counter
impl<'de> Deserialize<'de> for Counter
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Counter
impl PartialEq for Counter
source§impl StateMachine for Counter
impl StateMachine for Counter
§type Transition = CounterTransition
type Transition = CounterTransition
The
StateMachine::Transition
type associates another type with this state machine
as its transitions.type Conflict = NeverConflict
source§fn apply(&self, event: &CounterTransition) -> Result<Counter, NeverConflict>
fn apply(&self, event: &CounterTransition) -> Result<Counter, NeverConflict>
Update the state machine according to the given [
Transition
]. This method must be
deterministic: calling it on a clone of the state with a clone of the [Transition
]
must result in the same state, even at a different time and on a different machine. This
is the requirement that allows Aper to keep the state in sync across multiple machines.impl StructuralPartialEq for Counter
Auto Trait Implementations§
impl Freeze for Counter
impl RefUnwindSafe for Counter
impl Send for Counter
impl Sync for Counter
impl Unpin for Counter
impl UnwindSafe for Counter
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