pub struct IncrByFloat {
pub key: String,
pub increment: f64,
}Expand description
Increment the string representing a floating point number stored at key by the specified increment. By using a negative increment value, the result is that the value stored at the key is decremented (by the obvious properties of addition). If the key does not exist, it is set to 0 before performing the operation.
Ref: https://redis.io/docs/latest/commands/incrbyfloat/
TODO:
- Handle overflow errors.
- The precision of the output is fixed at 17 digits after the decimal point regardless of the actual internal precision of the computation.
- Both the value already contained in the string key and the increment argument can be optionally provided in exponential notation.
Fields§
§key: String§increment: f64Trait Implementations§
Source§impl Debug for IncrByFloat
impl Debug for IncrByFloat
Source§impl Executable for IncrByFloat
impl Executable for IncrByFloat
Source§impl PartialEq for IncrByFloat
impl PartialEq for IncrByFloat
impl StructuralPartialEq for IncrByFloat
Auto Trait Implementations§
impl Freeze for IncrByFloat
impl RefUnwindSafe for IncrByFloat
impl Send for IncrByFloat
impl Sync for IncrByFloat
impl Unpin for IncrByFloat
impl UnwindSafe for IncrByFloat
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