pub struct Counted {
pub value: Num,
pub applied: Num,
pub stored: bool,
}Expand description
What INCREX did.
Both halves reach the client: the reply is the value and then the amount applied, and an amount of zero is how a client tells a refused increment from one that happened to add nothing.
Fields§
§value: NumThe value now, which is the value before when the increment was refused.
applied: NumHow much was actually added, which is zero when nothing was.
stored: boolWhether anything was written. A refused increment does not create the key and does not touch its deadline.
Trait Implementations§
impl Copy for Counted
impl StructuralPartialEq for Counted
Auto Trait Implementations§
impl Freeze for Counted
impl RefUnwindSafe for Counted
impl Send for Counted
impl Sync for Counted
impl Unpin for Counted
impl UnsafeUnpin for Counted
impl UnwindSafe for Counted
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