Struct aper::data_structures::Constant
source · [−]Expand description
A struct that can wrap a value so that it can be used in place of a state machine, but
Implementations
Trait Implementations
sourceimpl<'de, T: Clone + PartialEq + Debug + Unpin + Send + Sync> Deserialize<'de> for Constant<T>where
T: Deserialize<'de>,
impl<'de, T: Clone + PartialEq + Debug + Unpin + Send + Sync> Deserialize<'de> for Constant<T>where
T: Deserialize<'de>,
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 + Clone + PartialEq + Debug + Unpin + Send + Sync> PartialEq<Constant<T>> for Constant<T>
impl<T: PartialEq + Clone + PartialEq + Debug + Unpin + Send + Sync> PartialEq<Constant<T>> for Constant<T>
sourceimpl<T: Clone + PartialEq + Debug + Unpin + Send + Sync> Serialize for Constant<T>where
T: Serialize,
impl<T: Clone + PartialEq + Debug + Unpin + Send + Sync> Serialize for Constant<T>where
T: Serialize,
sourceimpl<T: Send + Sync> StateMachine for Constant<T>where
T: 'static + Serialize + DeserializeOwned + Unpin + Send + Clone + PartialEq + Debug,
impl<T: Send + Sync> StateMachine for Constant<T>where
T: 'static + Serialize + DeserializeOwned + Unpin + Send + Clone + PartialEq + Debug,
type Transition = InvalidTransition
type Transition = InvalidTransition
The
StateMachine::Transition
type associates another type with this state machine
as its transitions. Read moretype Conflict = NeverConflict
sourcefn apply(
&self,
_transition_event: &InvalidTransition
) -> Result<Self, NeverConflict>
fn apply(
&self,
_transition_event: &InvalidTransition
) -> 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: Clone + PartialEq + Debug + Unpin + Send + Sync> StructuralPartialEq for Constant<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Constant<T>where
T: RefUnwindSafe,
impl<T> Send for Constant<T>
impl<T> Sync for Constant<T>
impl<T> Unpin for Constant<T>
impl<T> UnwindSafe for Constant<T>where
T: UnwindSafe,
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