pub struct SortedSetAddOptions { /* private fields */ }
Expand description
Options for the ZADD command
Implementations§
Source§impl SortedSetAddOptions
impl SortedSetAddOptions
Sourcepub fn add_only() -> Self
pub fn add_only() -> Self
Sets the NX option for the ZADD command Only add a member if it does not already exist.
Sourcepub fn update_only(conditional_update: Option<UpdateCheck>) -> Self
pub fn update_only(conditional_update: Option<UpdateCheck>) -> Self
Sets the XX option and optionally the GT/LT option for the ZADD command Only update existing members
Sourcepub fn add_or_update(conditional_update: Option<UpdateCheck>) -> Self
pub fn add_or_update(conditional_update: Option<UpdateCheck>) -> Self
Optionally sets the GT/LT option for the ZADD command Add new member or update existing
Sourcepub fn include_changed_count(self) -> Self
pub fn include_changed_count(self) -> Self
Sets the CH option for the ZADD command Return the number of elements changed (not just added).
Sourcepub fn increment_score(self) -> Self
pub fn increment_score(self) -> Self
Sets the INCR option for the ZADD command Increment the score of the member instead of setting it.
Trait Implementations§
Source§impl Clone for SortedSetAddOptions
impl Clone for SortedSetAddOptions
Source§fn clone(&self) -> SortedSetAddOptions
fn clone(&self) -> SortedSetAddOptions
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 Default for SortedSetAddOptions
impl Default for SortedSetAddOptions
Source§fn default() -> SortedSetAddOptions
fn default() -> SortedSetAddOptions
Returns the “default value” for a type. Read more
Source§impl ToRedisArgs for SortedSetAddOptions
impl ToRedisArgs for SortedSetAddOptions
Source§fn write_redis_args<W>(&self, out: &mut W)where
W: ?Sized + RedisWrite,
fn write_redis_args<W>(&self, out: &mut W)where
W: ?Sized + RedisWrite,
This writes the value into a vector of bytes. Each item
is a single argument. Most items generate a single item. Read more
Source§fn to_redis_args(&self) -> Vec<Vec<u8>>
fn to_redis_args(&self) -> Vec<Vec<u8>>
This converts the value into a vector of bytes. Each item
is a single argument. Most items generate a vector of a
single item. Read more
Source§fn describe_numeric_behavior(&self) -> NumericBehavior
fn describe_numeric_behavior(&self) -> NumericBehavior
Returns an information about the contained value with regards
to it’s numeric behavior in a redis context. This is used in
some high level concepts to switch between different implementations
of redis functions (for instance
INCR
vs INCRBYFLOAT
).Source§fn num_of_args(&self) -> usize
fn num_of_args(&self) -> usize
Returns the number of arguments this value will generate. Read more
impl Copy for SortedSetAddOptions
Auto Trait Implementations§
impl Freeze for SortedSetAddOptions
impl RefUnwindSafe for SortedSetAddOptions
impl Send for SortedSetAddOptions
impl Sync for SortedSetAddOptions
impl Unpin for SortedSetAddOptions
impl UnwindSafe for SortedSetAddOptions
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