pub struct CounterState {
pub value: i64,
pub operation_count: u64,
}Expand description
State of the counter state machine
Fields§
§value: i64The current counter value
operation_count: u64Total number of operations performed
Trait Implementations§
Source§impl Clone for CounterState
impl Clone for CounterState
Source§fn clone(&self) -> CounterState
fn clone(&self) -> CounterState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CounterState
impl Debug for CounterState
Source§impl Default for CounterState
impl Default for CounterState
Source§fn default() -> CounterState
fn default() -> CounterState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CounterState
impl<'de> Deserialize<'de> for CounterState
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 CounterState
impl PartialEq for CounterState
Source§fn eq(&self, other: &CounterState) -> bool
fn eq(&self, other: &CounterState) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CounterState
impl Serialize for CounterState
impl StructuralPartialEq for CounterState
Auto Trait Implementations§
impl Freeze for CounterState
impl RefUnwindSafe for CounterState
impl Send for CounterState
impl Sync for CounterState
impl Unpin for CounterState
impl UnsafeUnpin for CounterState
impl UnwindSafe for CounterState
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