Struct aper::data_structures::AtomRc
source · [−]pub struct AtomRc<T> { /* private fields */ }
Expand description
A StateMachine representing a value which is “atomic” from the perspective of managing state: it is only ever changed by completely replacing it.
Implementations
Trait Implementations
sourceimpl<'de, T: Deserialize<'de>> Deserialize<'de> for AtomRc<T>
impl<'de, T: Deserialize<'de>> Deserialize<'de> for AtomRc<T>
sourcefn 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
sourceimpl<T: PartialEq> PartialEq<AtomRc<T>> for AtomRc<T>
impl<T: PartialEq> PartialEq<AtomRc<T>> for AtomRc<T>
sourceimpl<T: Debug + Clone + Serialize + DeserializeOwned + PartialEq + 'static> StateMachine for AtomRc<T>
impl<T: Debug + Clone + Serialize + DeserializeOwned + PartialEq + 'static> StateMachine for AtomRc<T>
type Transition = ReplaceAtomRc<T>
type Transition = ReplaceAtomRc<T>
The
StateMachine::Transition
type associates another type with this state machine
as its transitions. Read moretype Conflict = NeverConflict
sourcefn apply(
&self,
transition_event: &Self::Transition
) -> Result<Self, NeverConflict>
fn apply(
&self,
transition_event: &Self::Transition
) -> Result<Self, 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. Read moreimpl<T> StructuralPartialEq for AtomRc<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for AtomRc<T>where
T: RefUnwindSafe,
impl<T> !Send for AtomRc<T>
impl<T> !Sync for AtomRc<T>
impl<T> Unpin for AtomRc<T>
impl<T> UnwindSafe for AtomRc<T>where
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more