pub enum CounterCommand {
Increment(i64),
Decrement(i64),
Set(i64),
Get,
Reset,
}Expand description
Commands that can be applied to the counter
Variants§
Increment(i64)
Increment the counter by the given value
Decrement(i64)
Decrement the counter by the given value
Set(i64)
Set the counter to a specific value
Get
Get the current value (read-only operation)
Reset
Reset the counter to zero
Trait Implementations§
Source§impl Clone for CounterCommand
impl Clone for CounterCommand
Source§fn clone(&self) -> CounterCommand
fn clone(&self) -> CounterCommand
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 CounterCommand
impl Debug for CounterCommand
Source§impl<'de> Deserialize<'de> for CounterCommand
impl<'de> Deserialize<'de> for CounterCommand
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 CounterCommand
impl PartialEq for CounterCommand
Source§impl Serialize for CounterCommand
impl Serialize for CounterCommand
impl StructuralPartialEq for CounterCommand
Auto Trait Implementations§
impl Freeze for CounterCommand
impl RefUnwindSafe for CounterCommand
impl Send for CounterCommand
impl Sync for CounterCommand
impl Unpin for CounterCommand
impl UnsafeUnpin for CounterCommand
impl UnwindSafe for CounterCommand
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