pub enum UniversalConnection {
Client(Connection),
Cluster(ClusterConnection),
}Variants
Client(Connection)
Cluster(ClusterConnection)
Trait Implementations
sourceimpl ConnectionLike for UniversalConnection
impl ConnectionLike for UniversalConnection
sourcefn req_packed_command(&mut self, cmd: &[u8]) -> RedisResult<Value>
fn req_packed_command(&mut self, cmd: &[u8]) -> RedisResult<Value>
Sends an already encoded (packed) command into the TCP socket and reads the single response from it. Read more
sourcefn req_packed_commands(
&mut self,
cmd: &[u8],
offset: usize,
count: usize
) -> RedisResult<Vec<Value>>
fn req_packed_commands(
&mut self,
cmd: &[u8],
offset: usize,
count: usize
) -> RedisResult<Vec<Value>>
Sends multiple already encoded (packed) command into the TCP socket
and reads count responses from it. This is used to implement
pipelining. Read more
sourcefn get_db(&self) -> i64
fn get_db(&self) -> i64
Returns the database this connection is bound to. Note that this information might be unreliable because it’s initially cached and also might be incorrect if the connection like object is not actually connected. Read more
sourcefn check_connection(&mut self) -> bool
fn check_connection(&mut self) -> bool
Check that all connections it has are available (PING internally).
sourcefn req_command(&mut self, cmd: &Cmd) -> Result<Value, RedisError>
fn req_command(&mut self, cmd: &Cmd) -> Result<Value, RedisError>
Sends a Cmd into the TCP socket and reads a single response from it.
Auto Trait Implementations
impl !RefUnwindSafe for UniversalConnection
impl Send for UniversalConnection
impl !Sync for UniversalConnection
impl Unpin for UniversalConnection
impl !UnwindSafe for UniversalConnection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Commands for T where
T: ConnectionLike,
impl<T> Commands for T where
T: ConnectionLike,
sourcefn get<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn get<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Get the value of a key. If key is a vec this becomes an MGET.
sourcefn keys<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn keys<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Gets all keys matching pattern
sourcefn set<K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn set<K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Set the string value of a key.
sourcefn set_multiple<K, V, RV>(
&mut self,
items: &'a [(K, V)]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn set_multiple<K, V, RV>(
&mut self,
items: &'a [(K, V)]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Sets multiple keys to their values.
sourcefn set_ex<K, V, RV>(
&mut self,
key: K,
value: V,
seconds: usize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn set_ex<K, V, RV>(
&mut self,
key: K,
value: V,
seconds: usize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Set the value and expiration of a key.
sourcefn pset_ex<K, V, RV>(
&mut self,
key: K,
value: V,
milliseconds: usize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn pset_ex<K, V, RV>(
&mut self,
key: K,
value: V,
milliseconds: usize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Set the value and expiration in milliseconds of a key.
sourcefn set_nx<K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn set_nx<K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Set the value of a key, only if the key does not exist
sourcefn mset_nx<K, V, RV>(&mut self, items: &'a [(K, V)]) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn mset_nx<K, V, RV>(&mut self, items: &'a [(K, V)]) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Sets multiple keys to their values failing if at least one already exists.
sourcefn getset<K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn getset<K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Set the string value of a key and return its old value.
sourcefn getrange<K, RV>(
&mut self,
key: K,
from: isize,
to: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn getrange<K, RV>(
&mut self,
key: K,
from: isize,
to: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Get a range of bytes/substring from the value of a key. Negative values provide an offset from the end of the value.
sourcefn setrange<K, V, RV>(
&mut self,
key: K,
offset: isize,
value: V
) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn setrange<K, V, RV>(
&mut self,
key: K,
offset: isize,
value: V
) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Overwrite the part of the value stored in key at the specified offset.
sourcefn del<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn del<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Delete one or more keys.
sourcefn exists<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn exists<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Determine if a key exists.
sourcefn expire<K, RV>(&mut self, key: K, seconds: usize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn expire<K, RV>(&mut self, key: K, seconds: usize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Set a key’s time to live in seconds.
sourcefn expire_at<K, RV>(&mut self, key: K, ts: usize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn expire_at<K, RV>(&mut self, key: K, ts: usize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Set the expiration for a key as a UNIX timestamp.
sourcefn pexpire<K, RV>(&mut self, key: K, ms: usize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn pexpire<K, RV>(&mut self, key: K, ms: usize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Set a key’s time to live in milliseconds.
sourcefn pexpire_at<K, RV>(&mut self, key: K, ts: usize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn pexpire_at<K, RV>(&mut self, key: K, ts: usize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Set the expiration for a key as a UNIX timestamp in milliseconds.
sourcefn persist<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn persist<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Remove the expiration from a key.
sourcefn ttl<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn ttl<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Get the expiration time of a key.
sourcefn pttl<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn pttl<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Get the expiration time of a key in milliseconds.
sourcefn rename<K, RV>(&mut self, key: K, new_key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn rename<K, RV>(&mut self, key: K, new_key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Rename a key.
sourcefn rename_nx<K, RV>(&mut self, key: K, new_key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn rename_nx<K, RV>(&mut self, key: K, new_key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Rename a key, only if the new key does not exist.
sourcefn unlink<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn unlink<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Unlink one or more keys.
sourcefn append<K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn append<K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Append a value to a key.
sourcefn incr<K, V, RV>(&mut self, key: K, delta: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn incr<K, V, RV>(&mut self, key: K, delta: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Increment the numeric value of a key by the given amount. This
issues a INCRBY or INCRBYFLOAT depending on the type. Read more
sourcefn decr<K, V, RV>(&mut self, key: K, delta: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn decr<K, V, RV>(&mut self, key: K, delta: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Decrement the numeric value of a key by the given amount.
sourcefn setbit<K, RV>(
&mut self,
key: K,
offset: usize,
value: bool
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn setbit<K, RV>(
&mut self,
key: K,
offset: usize,
value: bool
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Sets or clears the bit at offset in the string value stored at key.
sourcefn getbit<K, RV>(&mut self, key: K, offset: usize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn getbit<K, RV>(&mut self, key: K, offset: usize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Returns the bit value at offset in the string value stored at key.
sourcefn bitcount<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn bitcount<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Count set bits in a string.
sourcefn bitcount_range<K, RV>(
&mut self,
key: K,
start: usize,
end: usize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn bitcount_range<K, RV>(
&mut self,
key: K,
start: usize,
end: usize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Count set bits in a string in a range.
sourcefn bit_and<K, RV>(&mut self, dstkey: K, srckeys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn bit_and<K, RV>(&mut self, dstkey: K, srckeys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Perform a bitwise AND between multiple keys (containing string values) and store the result in the destination key. Read more
sourcefn bit_or<K, RV>(&mut self, dstkey: K, srckeys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn bit_or<K, RV>(&mut self, dstkey: K, srckeys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Perform a bitwise OR between multiple keys (containing string values) and store the result in the destination key. Read more
sourcefn bit_xor<K, RV>(&mut self, dstkey: K, srckeys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn bit_xor<K, RV>(&mut self, dstkey: K, srckeys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Perform a bitwise XOR between multiple keys (containing string values) and store the result in the destination key. Read more
sourcefn bit_not<K, RV>(&mut self, dstkey: K, srckey: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn bit_not<K, RV>(&mut self, dstkey: K, srckey: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Perform a bitwise NOT of the key (containing string values) and store the result in the destination key. Read more
sourcefn strlen<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn strlen<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Get the length of the value stored in a key.
sourcefn hget<K, F, RV>(&mut self, key: K, field: F) -> Result<RV, RedisError> where
K: ToRedisArgs,
F: ToRedisArgs,
RV: FromRedisValue,
fn hget<K, F, RV>(&mut self, key: K, field: F) -> Result<RV, RedisError> where
K: ToRedisArgs,
F: ToRedisArgs,
RV: FromRedisValue,
Gets a single (or multiple) fields from a hash.
sourcefn hdel<K, F, RV>(&mut self, key: K, field: F) -> Result<RV, RedisError> where
K: ToRedisArgs,
F: ToRedisArgs,
RV: FromRedisValue,
fn hdel<K, F, RV>(&mut self, key: K, field: F) -> Result<RV, RedisError> where
K: ToRedisArgs,
F: ToRedisArgs,
RV: FromRedisValue,
Deletes a single (or multiple) fields from a hash.
sourcefn hset<K, F, V, RV>(
&mut self,
key: K,
field: F,
value: V
) -> Result<RV, RedisError> where
K: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn hset<K, F, V, RV>(
&mut self,
key: K,
field: F,
value: V
) -> Result<RV, RedisError> where
K: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Sets a single field in a hash.
sourcefn hset_nx<K, F, V, RV>(
&mut self,
key: K,
field: F,
value: V
) -> Result<RV, RedisError> where
K: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn hset_nx<K, F, V, RV>(
&mut self,
key: K,
field: F,
value: V
) -> Result<RV, RedisError> where
K: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Sets a single field in a hash if it does not exist.
sourcefn hset_multiple<K, F, V, RV>(
&mut self,
key: K,
items: &'a [(F, V)]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn hset_multiple<K, F, V, RV>(
&mut self,
key: K,
items: &'a [(F, V)]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Sets a multiple fields in a hash.
sourcefn hincr<K, F, D, RV>(
&mut self,
key: K,
field: F,
delta: D
) -> Result<RV, RedisError> where
K: ToRedisArgs,
F: ToRedisArgs,
D: ToRedisArgs,
RV: FromRedisValue,
fn hincr<K, F, D, RV>(
&mut self,
key: K,
field: F,
delta: D
) -> Result<RV, RedisError> where
K: ToRedisArgs,
F: ToRedisArgs,
D: ToRedisArgs,
RV: FromRedisValue,
Increments a value.
sourcefn hexists<K, F, RV>(&mut self, key: K, field: F) -> Result<RV, RedisError> where
K: ToRedisArgs,
F: ToRedisArgs,
RV: FromRedisValue,
fn hexists<K, F, RV>(&mut self, key: K, field: F) -> Result<RV, RedisError> where
K: ToRedisArgs,
F: ToRedisArgs,
RV: FromRedisValue,
Checks if a field in a hash exists.
sourcefn hkeys<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn hkeys<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Gets all the keys in a hash.
sourcefn hvals<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn hvals<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Gets all the values in a hash.
sourcefn hgetall<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn hgetall<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Gets all the fields and values in a hash.
sourcefn hlen<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn hlen<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Gets the length of a hash.
sourcefn blmove<K, RV>(
&mut self,
srckey: K,
dstkey: K,
src_dir: Direction,
dst_dir: Direction,
timeout: usize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn blmove<K, RV>(
&mut self,
srckey: K,
dstkey: K,
src_dir: Direction,
dst_dir: Direction,
timeout: usize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Pop an element from a list, push it to another list and return it; or block until one is available Read more
sourcefn blmpop<K, RV>(
&mut self,
timeout: usize,
numkeys: usize,
key: K,
dir: Direction,
count: usize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn blmpop<K, RV>(
&mut self,
timeout: usize,
numkeys: usize,
key: K,
dir: Direction,
count: usize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Pops count elements from the first non-empty list key from the list of
provided key names; or blocks until one is available. Read more
sourcefn blpop<K, RV>(&mut self, key: K, timeout: usize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn blpop<K, RV>(&mut self, key: K, timeout: usize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Remove and get the first element in a list, or block until one is available.
sourcefn brpop<K, RV>(&mut self, key: K, timeout: usize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn brpop<K, RV>(&mut self, key: K, timeout: usize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Remove and get the last element in a list, or block until one is available.
sourcefn brpoplpush<K, RV>(
&mut self,
srckey: K,
dstkey: K,
timeout: usize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn brpoplpush<K, RV>(
&mut self,
srckey: K,
dstkey: K,
timeout: usize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Pop a value from a list, push it to another list and return it; or block until one is available. Read more
sourcefn lindex<K, RV>(&mut self, key: K, index: isize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn lindex<K, RV>(&mut self, key: K, index: isize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Get an element from a list by its index.
sourcefn linsert_before<K, P, V, RV>(
&mut self,
key: K,
pivot: P,
value: V
) -> Result<RV, RedisError> where
K: ToRedisArgs,
P: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn linsert_before<K, P, V, RV>(
&mut self,
key: K,
pivot: P,
value: V
) -> Result<RV, RedisError> where
K: ToRedisArgs,
P: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Insert an element before another element in a list.
sourcefn linsert_after<K, P, V, RV>(
&mut self,
key: K,
pivot: P,
value: V
) -> Result<RV, RedisError> where
K: ToRedisArgs,
P: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn linsert_after<K, P, V, RV>(
&mut self,
key: K,
pivot: P,
value: V
) -> Result<RV, RedisError> where
K: ToRedisArgs,
P: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Insert an element after another element in a list.
sourcefn llen<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn llen<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Returns the length of the list stored at key.
sourcefn lmove<K, RV>(
&mut self,
srckey: K,
dstkey: K,
src_dir: Direction,
dst_dir: Direction
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn lmove<K, RV>(
&mut self,
srckey: K,
dstkey: K,
src_dir: Direction,
dst_dir: Direction
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Pop an element a list, push it to another list and return it
sourcefn lmpop<K, RV>(
&mut self,
numkeys: usize,
key: K,
dir: Direction,
count: usize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn lmpop<K, RV>(
&mut self,
numkeys: usize,
key: K,
dir: Direction,
count: usize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Pops count elements from the first non-empty list key from the list of
provided key names. Read more
sourcefn lpop<K, RV>(
&mut self,
key: K,
count: Option<NonZeroUsize>
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn lpop<K, RV>(
&mut self,
key: K,
count: Option<NonZeroUsize>
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Removes and returns the up to count first elements of the list stored at key. Read more
sourcefn lpos<K, V, RV>(
&mut self,
key: K,
value: V,
options: LposOptions
) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn lpos<K, V, RV>(
&mut self,
key: K,
value: V,
options: LposOptions
) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Returns the index of the first matching value of the list stored at key.
sourcefn lpush<K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn lpush<K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Insert all the specified values at the head of the list stored at key.
sourcefn lpush_exists<K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn lpush_exists<K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Inserts a value at the head of the list stored at key, only if key already exists and holds a list. Read more
sourcefn lrange<K, RV>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn lrange<K, RV>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Returns the specified elements of the list stored at key.
sourcefn lrem<K, V, RV>(
&mut self,
key: K,
count: isize,
value: V
) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn lrem<K, V, RV>(
&mut self,
key: K,
count: isize,
value: V
) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Removes the first count occurrences of elements equal to value from the list stored at key. Read more
sourcefn ltrim<K, RV>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn ltrim<K, RV>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Trim an existing list so that it will contain only the specified range of elements specified. Read more
sourcefn lset<K, V, RV>(
&mut self,
key: K,
index: isize,
value: V
) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn lset<K, V, RV>(
&mut self,
key: K,
index: isize,
value: V
) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Sets the list element at index to value
sourcefn rpop<K, RV>(
&mut self,
key: K,
count: Option<NonZeroUsize>
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn rpop<K, RV>(
&mut self,
key: K,
count: Option<NonZeroUsize>
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Removes and returns the up to count last elements of the list stored at key Read more
sourcefn rpoplpush<K, RV>(&mut self, key: K, dstkey: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn rpoplpush<K, RV>(&mut self, key: K, dstkey: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Pop a value from a list, push it to another list and return it.
sourcefn rpush<K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn rpush<K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Insert all the specified values at the tail of the list stored at key.
sourcefn rpush_exists<K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn rpush_exists<K, V, RV>(&mut self, key: K, value: V) -> Result<RV, RedisError> where
K: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Inserts value at the tail of the list stored at key, only if key already exists and holds a list. Read more
sourcefn sadd<K, M, RV>(&mut self, key: K, member: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn sadd<K, M, RV>(&mut self, key: K, member: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Add one or more members to a set.
sourcefn scard<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn scard<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Get the number of members in a set.
sourcefn sdiff<K, RV>(&mut self, keys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn sdiff<K, RV>(&mut self, keys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Subtract multiple sets.
sourcefn sdiffstore<K, RV>(&mut self, dstkey: K, keys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn sdiffstore<K, RV>(&mut self, dstkey: K, keys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Subtract multiple sets and store the resulting set in a key.
sourcefn sinter<K, RV>(&mut self, keys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn sinter<K, RV>(&mut self, keys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Intersect multiple sets.
sourcefn sinterstore<K, RV>(&mut self, dstkey: K, keys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn sinterstore<K, RV>(&mut self, dstkey: K, keys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Intersect multiple sets and store the resulting set in a key.
sourcefn sismember<K, M, RV>(&mut self, key: K, member: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn sismember<K, M, RV>(&mut self, key: K, member: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Determine if a given value is a member of a set.
sourcefn smembers<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn smembers<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Get all the members in a set.
sourcefn smove<K, M, RV>(
&mut self,
srckey: K,
dstkey: K,
member: M
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn smove<K, M, RV>(
&mut self,
srckey: K,
dstkey: K,
member: M
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Move a member from one set to another.
sourcefn spop<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn spop<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Remove and return a random member from a set.
sourcefn srandmember<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn srandmember<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Get one random member from a set.
sourcefn srandmember_multiple<K, RV>(
&mut self,
key: K,
count: usize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn srandmember_multiple<K, RV>(
&mut self,
key: K,
count: usize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Get multiple random members from a set.
sourcefn srem<K, M, RV>(&mut self, key: K, member: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn srem<K, M, RV>(&mut self, key: K, member: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Remove one or more members from a set.
sourcefn sunion<K, RV>(&mut self, keys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn sunion<K, RV>(&mut self, keys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Add multiple sets.
sourcefn sunionstore<K, RV>(&mut self, dstkey: K, keys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn sunionstore<K, RV>(&mut self, dstkey: K, keys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Add multiple sets and store the resulting set in a key.
sourcefn zadd<K, S, M, RV>(
&mut self,
key: K,
member: M,
score: S
) -> Result<RV, RedisError> where
K: ToRedisArgs,
S: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zadd<K, S, M, RV>(
&mut self,
key: K,
member: M,
score: S
) -> Result<RV, RedisError> where
K: ToRedisArgs,
S: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Add one member to a sorted set, or update its score if it already exists.
sourcefn zadd_multiple<K, S, M, RV>(
&mut self,
key: K,
items: &'a [(S, M)]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
S: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zadd_multiple<K, S, M, RV>(
&mut self,
key: K,
items: &'a [(S, M)]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
S: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Add multiple members to a sorted set, or update its score if it already exists.
sourcefn zcard<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn zcard<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Get the number of members in a sorted set.
sourcefn zcount<K, M, MM, RV>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
fn zcount<K, M, MM, RV>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
Count the members in a sorted set with scores within the given values.
sourcefn zincr<K, M, D, RV>(
&mut self,
key: K,
member: M,
delta: D
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
D: ToRedisArgs,
RV: FromRedisValue,
fn zincr<K, M, D, RV>(
&mut self,
key: K,
member: M,
delta: D
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
D: ToRedisArgs,
RV: FromRedisValue,
Increments the member in a sorted set at key by delta. If the member does not exist, it is added with delta as its score. Read more
sourcefn zinterstore<K, RV>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn zinterstore<K, RV>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Intersect multiple sorted sets and store the resulting sorted set in a new key using SUM as aggregation function. Read more
sourcefn zinterstore_min<K, RV>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn zinterstore_min<K, RV>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Intersect multiple sorted sets and store the resulting sorted set in a new key using MIN as aggregation function. Read more
sourcefn zinterstore_max<K, RV>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn zinterstore_max<K, RV>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Intersect multiple sorted sets and store the resulting sorted set in a new key using MAX as aggregation function. Read more
sourcefn zlexcount<K, L, RV>(
&mut self,
key: K,
min: L,
max: L
) -> Result<RV, RedisError> where
K: ToRedisArgs,
L: ToRedisArgs,
RV: FromRedisValue,
fn zlexcount<K, L, RV>(
&mut self,
key: K,
min: L,
max: L
) -> Result<RV, RedisError> where
K: ToRedisArgs,
L: ToRedisArgs,
RV: FromRedisValue,
Count the number of members in a sorted set between a given lexicographical range.
sourcefn zpopmax<K, RV>(&mut self, key: K, count: isize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn zpopmax<K, RV>(&mut self, key: K, count: isize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Removes and returns up to count members with the highest scores in a sorted set
sourcefn zpopmin<K, RV>(&mut self, key: K, count: isize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn zpopmin<K, RV>(&mut self, key: K, count: isize) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Removes and returns up to count members with the lowest scores in a sorted set
sourcefn zrandmember<K, RV>(
&mut self,
key: K,
count: Option<isize>
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn zrandmember<K, RV>(
&mut self,
key: K,
count: Option<isize>
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Return up to count random members in a sorted set (or 1 if count == None)
sourcefn zrandmember_withscores<K, RV>(
&mut self,
key: K,
count: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn zrandmember_withscores<K, RV>(
&mut self,
key: K,
count: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Return up to count random members in a sorted set with scores
sourcefn zrange<K, RV>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn zrange<K, RV>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by index
sourcefn zrange_withscores<K, RV>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn zrange_withscores<K, RV>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by index with scores.
sourcefn zrangebylex<K, M, MM, RV>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
fn zrangebylex<K, M, MM, RV>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by lexicographical range.
sourcefn zrangebylex_limit<K, M, MM, RV>(
&mut self,
key: K,
min: M,
max: MM,
offset: isize,
count: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
fn zrangebylex_limit<K, M, MM, RV>(
&mut self,
key: K,
min: M,
max: MM,
offset: isize,
count: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by lexicographical range with offset and limit. Read more
sourcefn zrevrangebylex<K, MM, M, RV>(
&mut self,
key: K,
max: MM,
min: M
) -> Result<RV, RedisError> where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zrevrangebylex<K, MM, M, RV>(
&mut self,
key: K,
max: MM,
min: M
) -> Result<RV, RedisError> where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by lexicographical range.
sourcefn zrevrangebylex_limit<K, MM, M, RV>(
&mut self,
key: K,
max: MM,
min: M,
offset: isize,
count: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zrevrangebylex_limit<K, MM, M, RV>(
&mut self,
key: K,
max: MM,
min: M,
offset: isize,
count: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by lexicographical range with offset and limit. Read more
sourcefn zrangebyscore<K, M, MM, RV>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
fn zrangebyscore<K, M, MM, RV>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by score.
sourcefn zrangebyscore_withscores<K, M, MM, RV>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
fn zrangebyscore_withscores<K, M, MM, RV>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by score with scores.
sourcefn zrangebyscore_limit<K, M, MM, RV>(
&mut self,
key: K,
min: M,
max: MM,
offset: isize,
count: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
fn zrangebyscore_limit<K, M, MM, RV>(
&mut self,
key: K,
min: M,
max: MM,
offset: isize,
count: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by score with limit.
sourcefn zrangebyscore_limit_withscores<K, M, MM, RV>(
&mut self,
key: K,
min: M,
max: MM,
offset: isize,
count: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
fn zrangebyscore_limit_withscores<K, M, MM, RV>(
&mut self,
key: K,
min: M,
max: MM,
offset: isize,
count: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by score with limit with scores.
sourcefn zrank<K, M, RV>(&mut self, key: K, member: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zrank<K, M, RV>(&mut self, key: K, member: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Determine the index of a member in a sorted set.
sourcefn zrem<K, M, RV>(&mut self, key: K, members: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zrem<K, M, RV>(&mut self, key: K, members: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Remove one or more members from a sorted set.
sourcefn zrembylex<K, M, MM, RV>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
fn zrembylex<K, M, MM, RV>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
Remove all members in a sorted set between the given lexicographical range.
sourcefn zremrangebyrank<K, RV>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn zremrangebyrank<K, RV>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Remove all members in a sorted set within the given indexes.
sourcefn zrembyscore<K, M, MM, RV>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
fn zrembyscore<K, M, MM, RV>(
&mut self,
key: K,
min: M,
max: MM
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
MM: ToRedisArgs,
RV: FromRedisValue,
Remove all members in a sorted set within the given scores.
sourcefn zrevrange<K, RV>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn zrevrange<K, RV>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by index, with scores ordered from high to low. Read more
sourcefn zrevrange_withscores<K, RV>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn zrevrange_withscores<K, RV>(
&mut self,
key: K,
start: isize,
stop: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by index, with scores ordered from high to low. Read more
sourcefn zrevrangebyscore<K, MM, M, RV>(
&mut self,
key: K,
max: MM,
min: M
) -> Result<RV, RedisError> where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zrevrangebyscore<K, MM, M, RV>(
&mut self,
key: K,
max: MM,
min: M
) -> Result<RV, RedisError> where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by score.
sourcefn zrevrangebyscore_withscores<K, MM, M, RV>(
&mut self,
key: K,
max: MM,
min: M
) -> Result<RV, RedisError> where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zrevrangebyscore_withscores<K, MM, M, RV>(
&mut self,
key: K,
max: MM,
min: M
) -> Result<RV, RedisError> where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by score with scores.
sourcefn zrevrangebyscore_limit<K, MM, M, RV>(
&mut self,
key: K,
max: MM,
min: M,
offset: isize,
count: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zrevrangebyscore_limit<K, MM, M, RV>(
&mut self,
key: K,
max: MM,
min: M,
offset: isize,
count: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by score with limit.
sourcefn zrevrangebyscore_limit_withscores<K, MM, M, RV>(
&mut self,
key: K,
max: MM,
min: M,
offset: isize,
count: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zrevrangebyscore_limit_withscores<K, MM, M, RV>(
&mut self,
key: K,
max: MM,
min: M,
offset: isize,
count: isize
) -> Result<RV, RedisError> where
K: ToRedisArgs,
MM: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Return a range of members in a sorted set, by score with limit with scores.
sourcefn zrevrank<K, M, RV>(&mut self, key: K, member: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zrevrank<K, M, RV>(&mut self, key: K, member: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Determine the index of a member in a sorted set, with scores ordered from high to low.
sourcefn zscore<K, M, RV>(&mut self, key: K, member: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zscore<K, M, RV>(&mut self, key: K, member: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Get the score associated with the given member in a sorted set.
sourcefn zscore_multiple<K, M, RV>(
&mut self,
key: K,
members: &'a [M]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn zscore_multiple<K, M, RV>(
&mut self,
key: K,
members: &'a [M]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Get the scores associated with multiple members in a sorted set.
sourcefn zunionstore<K, RV>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn zunionstore<K, RV>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Unions multiple sorted sets and store the resulting sorted set in a new key using SUM as aggregation function. Read more
sourcefn zunionstore_min<K, RV>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn zunionstore_min<K, RV>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Unions multiple sorted sets and store the resulting sorted set in a new key using MIN as aggregation function. Read more
sourcefn zunionstore_max<K, RV>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn zunionstore_max<K, RV>(
&mut self,
dstkey: K,
keys: &'a [K]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Unions multiple sorted sets and store the resulting sorted set in a new key using MAX as aggregation function. Read more
sourcefn pfadd<K, E, RV>(&mut self, key: K, element: E) -> Result<RV, RedisError> where
K: ToRedisArgs,
E: ToRedisArgs,
RV: FromRedisValue,
fn pfadd<K, E, RV>(&mut self, key: K, element: E) -> Result<RV, RedisError> where
K: ToRedisArgs,
E: ToRedisArgs,
RV: FromRedisValue,
Adds the specified elements to the specified HyperLogLog.
sourcefn pfcount<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn pfcount<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s). Read more
sourcefn pfmerge<K, RV>(&mut self, dstkey: K, srckeys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn pfmerge<K, RV>(&mut self, dstkey: K, srckeys: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Merge N different HyperLogLogs into a single one.
sourcefn publish<K, E, RV>(
&mut self,
channel: K,
message: E
) -> Result<RV, RedisError> where
K: ToRedisArgs,
E: ToRedisArgs,
RV: FromRedisValue,
fn publish<K, E, RV>(
&mut self,
channel: K,
message: E
) -> Result<RV, RedisError> where
K: ToRedisArgs,
E: ToRedisArgs,
RV: FromRedisValue,
Posts a message to the given channel.
sourcefn acl_load<RV>(&mut self) -> Result<RV, RedisError> where
RV: FromRedisValue,
fn acl_load<RV>(&mut self) -> Result<RV, RedisError> where
RV: FromRedisValue,
When Redis is configured to use an ACL file (with the aclfile configuration option), this command will reload the ACLs from the file, replacing all the current ACL rules with the ones defined in the file. Read more
sourcefn acl_save<RV>(&mut self) -> Result<RV, RedisError> where
RV: FromRedisValue,
fn acl_save<RV>(&mut self) -> Result<RV, RedisError> where
RV: FromRedisValue,
When Redis is configured to use an ACL file (with the aclfile configuration option), this command will save the currently defined ACLs from the server memory to the ACL file. Read more
sourcefn acl_list<RV>(&mut self) -> Result<RV, RedisError> where
RV: FromRedisValue,
fn acl_list<RV>(&mut self) -> Result<RV, RedisError> where
RV: FromRedisValue,
Shows the currently active ACL rules in the Redis server.
sourcefn acl_users<RV>(&mut self) -> Result<RV, RedisError> where
RV: FromRedisValue,
fn acl_users<RV>(&mut self) -> Result<RV, RedisError> where
RV: FromRedisValue,
Shows a list of all the usernames of the currently configured users in the Redis ACL system. Read more
sourcefn acl_getuser<K, RV>(&mut self, username: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn acl_getuser<K, RV>(&mut self, username: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Returns all the rules defined for an existing ACL user.
sourcefn acl_setuser<K, RV>(&mut self, username: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn acl_setuser<K, RV>(&mut self, username: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Creates an ACL user without any privilege.
sourcefn acl_setuser_rules<K, RV>(
&mut self,
username: K,
rules: &'a [Rule]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn acl_setuser_rules<K, RV>(
&mut self,
username: K,
rules: &'a [Rule]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Creates an ACL user with the specified rules or modify the rules of an existing user. Read more
sourcefn acl_deluser<K, RV>(&mut self, usernames: &'a [K]) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn acl_deluser<K, RV>(&mut self, usernames: &'a [K]) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Delete all the specified ACL users and terminate all the connections that are authenticated with such users. Read more
sourcefn acl_cat<RV>(&mut self) -> Result<RV, RedisError> where
RV: FromRedisValue,
fn acl_cat<RV>(&mut self) -> Result<RV, RedisError> where
RV: FromRedisValue,
Shows the available ACL categories.
sourcefn acl_cat_categoryname<K, RV>(
&mut self,
categoryname: K
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn acl_cat_categoryname<K, RV>(
&mut self,
categoryname: K
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Shows all the Redis commands in the specified category.
sourcefn acl_genpass<RV>(&mut self) -> Result<RV, RedisError> where
RV: FromRedisValue,
fn acl_genpass<RV>(&mut self) -> Result<RV, RedisError> where
RV: FromRedisValue,
Generates a 256-bits password starting from /dev/urandom if available.
sourcefn acl_genpass_bits<RV>(&mut self, bits: isize) -> Result<RV, RedisError> where
RV: FromRedisValue,
fn acl_genpass_bits<RV>(&mut self, bits: isize) -> Result<RV, RedisError> where
RV: FromRedisValue,
Generates a 1-to-1024-bits password starting from /dev/urandom if available.
sourcefn acl_whoami<RV>(&mut self) -> Result<RV, RedisError> where
RV: FromRedisValue,
fn acl_whoami<RV>(&mut self) -> Result<RV, RedisError> where
RV: FromRedisValue,
Returns the username the current connection is authenticated with.
sourcefn acl_log<RV>(&mut self, count: isize) -> Result<RV, RedisError> where
RV: FromRedisValue,
fn acl_log<RV>(&mut self, count: isize) -> Result<RV, RedisError> where
RV: FromRedisValue,
Shows a list of recent ACL security events
sourcefn acl_log_reset<RV>(&mut self) -> Result<RV, RedisError> where
RV: FromRedisValue,
fn acl_log_reset<RV>(&mut self) -> Result<RV, RedisError> where
RV: FromRedisValue,
Clears the ACL log.
sourcefn acl_help<RV>(&mut self) -> Result<RV, RedisError> where
RV: FromRedisValue,
fn acl_help<RV>(&mut self) -> Result<RV, RedisError> where
RV: FromRedisValue,
Returns a helpful text describing the different subcommands.
sourcefn geo_add<K, M, RV>(&mut self, key: K, members: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn geo_add<K, M, RV>(&mut self, key: K, members: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Adds the specified geospatial items to the specified key. Read more
sourcefn geo_dist<K, M1, M2, RV>(
&mut self,
key: K,
member1: M1,
member2: M2,
unit: Unit
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M1: ToRedisArgs,
M2: ToRedisArgs,
RV: FromRedisValue,
fn geo_dist<K, M1, M2, RV>(
&mut self,
key: K,
member1: M1,
member2: M2,
unit: Unit
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M1: ToRedisArgs,
M2: ToRedisArgs,
RV: FromRedisValue,
Return the distance between two members in the geospatial index represented by the sorted set. Read more
sourcefn geo_hash<K, M, RV>(&mut self, key: K, members: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn geo_hash<K, M, RV>(&mut self, key: K, members: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
sourcefn geo_pos<K, M, RV>(&mut self, key: K, members: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn geo_pos<K, M, RV>(&mut self, key: K, members: M) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Return the positions of all the specified members of the geospatial index represented by the sorted set at key. Read more
sourcefn geo_radius<K, RV>(
&mut self,
key: K,
longitude: f64,
latitude: f64,
radius: f64,
unit: Unit,
options: RadiusOptions
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn geo_radius<K, RV>(
&mut self,
key: K,
longitude: f64,
latitude: f64,
radius: f64,
unit: Unit,
options: RadiusOptions
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
sourcefn geo_radius_by_member<K, M, RV>(
&mut self,
key: K,
member: M,
radius: f64,
unit: Unit,
options: RadiusOptions
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
fn geo_radius_by_member<K, M, RV>(
&mut self,
key: K,
member: M,
radius: f64,
unit: Unit,
options: RadiusOptions
) -> Result<RV, RedisError> where
K: ToRedisArgs,
M: ToRedisArgs,
RV: FromRedisValue,
Retrieve members selected by distance with the center of member. The
member itself is always contained in the results. Read more
sourcefn xack<K, G, I, RV>(
&mut self,
key: K,
group: G,
ids: &'a [I]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
I: ToRedisArgs,
RV: FromRedisValue,
fn xack<K, G, I, RV>(
&mut self,
key: K,
group: G,
ids: &'a [I]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
I: ToRedisArgs,
RV: FromRedisValue,
Ack pending stream messages checked out by a consumer. Read more
sourcefn xadd<K, ID, F, V, RV>(
&mut self,
key: K,
id: ID,
items: &'a [(F, V)]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
ID: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn xadd<K, ID, F, V, RV>(
&mut self,
key: K,
id: ID,
items: &'a [(F, V)]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
ID: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Add a stream message by key. Use * as the id for the current timestamp. Read more
sourcefn xadd_map<K, ID, BTM, RV>(
&mut self,
key: K,
id: ID,
map: BTM
) -> Result<RV, RedisError> where
K: ToRedisArgs,
ID: ToRedisArgs,
BTM: ToRedisArgs,
RV: FromRedisValue,
fn xadd_map<K, ID, BTM, RV>(
&mut self,
key: K,
id: ID,
map: BTM
) -> Result<RV, RedisError> where
K: ToRedisArgs,
ID: ToRedisArgs,
BTM: ToRedisArgs,
RV: FromRedisValue,
BTreeMap variant for adding a stream message by key.
Use * as the id for the current timestamp. Read more
sourcefn xadd_maxlen<K, ID, F, V, RV>(
&mut self,
key: K,
maxlen: StreamMaxlen,
id: ID,
items: &'a [(F, V)]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
ID: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
fn xadd_maxlen<K, ID, F, V, RV>(
&mut self,
key: K,
maxlen: StreamMaxlen,
id: ID,
items: &'a [(F, V)]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
ID: ToRedisArgs,
F: ToRedisArgs,
V: ToRedisArgs,
RV: FromRedisValue,
Add a stream message while capping the stream at a maxlength. Read more
sourcefn xadd_maxlen_map<K, ID, BTM, RV>(
&mut self,
key: K,
maxlen: StreamMaxlen,
id: ID,
map: BTM
) -> Result<RV, RedisError> where
K: ToRedisArgs,
ID: ToRedisArgs,
BTM: ToRedisArgs,
RV: FromRedisValue,
fn xadd_maxlen_map<K, ID, BTM, RV>(
&mut self,
key: K,
maxlen: StreamMaxlen,
id: ID,
map: BTM
) -> Result<RV, RedisError> where
K: ToRedisArgs,
ID: ToRedisArgs,
BTM: ToRedisArgs,
RV: FromRedisValue,
BTreeMap variant for adding a stream message while capping the stream at a maxlength. Read more
sourcefn xclaim<K, G, C, MIT, ID, RV>(
&mut self,
key: K,
group: G,
consumer: C,
min_idle_time: MIT,
ids: &'a [ID]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
C: ToRedisArgs,
MIT: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
fn xclaim<K, G, C, MIT, ID, RV>(
&mut self,
key: K,
group: G,
consumer: C,
min_idle_time: MIT,
ids: &'a [ID]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
C: ToRedisArgs,
MIT: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
Claim pending, unacked messages, after some period of time, currently checked out by another consumer. Read more
sourcefn xclaim_options<K, G, C, MIT, ID, RV>(
&mut self,
key: K,
group: G,
consumer: C,
min_idle_time: MIT,
ids: &'a [ID],
options: StreamClaimOptions
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
C: ToRedisArgs,
MIT: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
fn xclaim_options<K, G, C, MIT, ID, RV>(
&mut self,
key: K,
group: G,
consumer: C,
min_idle_time: MIT,
ids: &'a [ID],
options: StreamClaimOptions
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
C: ToRedisArgs,
MIT: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
This is the optional arguments version for claiming unacked, pending messages currently checked out by another consumer. Read more
sourcefn xdel<K, ID, RV>(&mut self, key: K, ids: &'a [ID]) -> Result<RV, RedisError> where
K: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
fn xdel<K, ID, RV>(&mut self, key: K, ids: &'a [ID]) -> Result<RV, RedisError> where
K: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
Deletes a list of ids for a given stream key. Read more
sourcefn xgroup_create<K, G, ID, RV>(
&mut self,
key: K,
group: G,
id: ID
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
fn xgroup_create<K, G, ID, RV>(
&mut self,
key: K,
group: G,
id: ID
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
This command is used for creating a consumer group. It expects the stream key
to already exist. Otherwise, use xgroup_create_mkstream if it doesn’t.
The id is the starting message id all consumers should read from. Use $ If you want
all consumers to read from the last message added to stream. Read more
sourcefn xgroup_create_mkstream<K, G, ID, RV>(
&mut self,
key: K,
group: G,
id: ID
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
fn xgroup_create_mkstream<K, G, ID, RV>(
&mut self,
key: K,
group: G,
id: ID
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
This is the alternate version for creating a consumer group
which makes the stream if it doesn’t exist. Read more
sourcefn xgroup_setid<K, G, ID, RV>(
&mut self,
key: K,
group: G,
id: ID
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
fn xgroup_setid<K, G, ID, RV>(
&mut self,
key: K,
group: G,
id: ID
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
Alter which id you want consumers to begin reading from an existing
consumer group. Read more
sourcefn xgroup_destroy<K, G, RV>(
&mut self,
key: K,
group: G
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
RV: FromRedisValue,
fn xgroup_destroy<K, G, RV>(
&mut self,
key: K,
group: G
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
RV: FromRedisValue,
Destroy an existing consumer group for a given stream key Read more
sourcefn xgroup_delconsumer<K, G, C, RV>(
&mut self,
key: K,
group: G,
consumer: C
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
C: ToRedisArgs,
RV: FromRedisValue,
fn xgroup_delconsumer<K, G, C, RV>(
&mut self,
key: K,
group: G,
consumer: C
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
C: ToRedisArgs,
RV: FromRedisValue,
This deletes a consumer from an existing consumer group
for given stream `key. Read more
sourcefn xinfo_consumers<K, G, RV>(
&mut self,
key: K,
group: G
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
RV: FromRedisValue,
fn xinfo_consumers<K, G, RV>(
&mut self,
key: K,
group: G
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
RV: FromRedisValue,
This returns all info details about
which consumers have read messages for given consumer group.
Take note of the StreamInfoConsumersReply return type. Read more
sourcefn xinfo_groups<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn xinfo_groups<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Returns all consumer groups created for a given stream key.
Take note of the StreamInfoGroupsReply return type. Read more
sourcefn xinfo_stream<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn xinfo_stream<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Returns info about high-level stream details
(first & last message id, length, number of groups, etc.)
Take note of the StreamInfoStreamReply return type. Read more
sourcefn xlen<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn xlen<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Returns the number of messages for a given stream key. Read more
sourcefn xpending<K, G, RV>(&mut self, key: K, group: G) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
RV: FromRedisValue,
fn xpending<K, G, RV>(&mut self, key: K, group: G) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
RV: FromRedisValue,
This is a basic version of making XPENDING command calls which only
passes a stream key and consumer group and it
returns details about which consumers have pending messages
that haven’t been acked. Read more
sourcefn xpending_count<K, G, S, E, C, RV>(
&mut self,
key: K,
group: G,
start: S,
end: E,
count: C
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
S: ToRedisArgs,
E: ToRedisArgs,
C: ToRedisArgs,
RV: FromRedisValue,
fn xpending_count<K, G, S, E, C, RV>(
&mut self,
key: K,
group: G,
start: S,
end: E,
count: C
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
S: ToRedisArgs,
E: ToRedisArgs,
C: ToRedisArgs,
RV: FromRedisValue,
This XPENDING version returns a list of all messages over the range. You can use this for paginating pending messages (but without the message HashMap). Read more
sourcefn xpending_consumer_count<K, G, S, E, C, CN, RV>(
&mut self,
key: K,
group: G,
start: S,
end: E,
count: C,
consumer: CN
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
S: ToRedisArgs,
E: ToRedisArgs,
C: ToRedisArgs,
CN: ToRedisArgs,
RV: FromRedisValue,
fn xpending_consumer_count<K, G, S, E, C, CN, RV>(
&mut self,
key: K,
group: G,
start: S,
end: E,
count: C,
consumer: CN
) -> Result<RV, RedisError> where
K: ToRedisArgs,
G: ToRedisArgs,
S: ToRedisArgs,
E: ToRedisArgs,
C: ToRedisArgs,
CN: ToRedisArgs,
RV: FromRedisValue,
An alternate version of xpending_count which filters by consumer name. Read more
sourcefn xrange<K, S, E, RV>(
&mut self,
key: K,
start: S,
end: E
) -> Result<RV, RedisError> where
K: ToRedisArgs,
S: ToRedisArgs,
E: ToRedisArgs,
RV: FromRedisValue,
fn xrange<K, S, E, RV>(
&mut self,
key: K,
start: S,
end: E
) -> Result<RV, RedisError> where
K: ToRedisArgs,
S: ToRedisArgs,
E: ToRedisArgs,
RV: FromRedisValue,
Returns a range of messages in a given stream key. Read more
sourcefn xrange_all<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn xrange_all<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
A helper method for automatically returning all messages in a stream by key.
Use with caution! Read more
sourcefn xrange_count<K, S, E, C, RV>(
&mut self,
key: K,
start: S,
end: E,
count: C
) -> Result<RV, RedisError> where
K: ToRedisArgs,
S: ToRedisArgs,
E: ToRedisArgs,
C: ToRedisArgs,
RV: FromRedisValue,
fn xrange_count<K, S, E, C, RV>(
&mut self,
key: K,
start: S,
end: E,
count: C
) -> Result<RV, RedisError> where
K: ToRedisArgs,
S: ToRedisArgs,
E: ToRedisArgs,
C: ToRedisArgs,
RV: FromRedisValue,
A method for paginating a stream by key. Read more
sourcefn xread<K, ID, RV>(
&mut self,
keys: &'a [K],
ids: &'a [ID]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
fn xread<K, ID, RV>(
&mut self,
keys: &'a [K],
ids: &'a [ID]
) -> Result<RV, RedisError> where
K: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
Read a list of ids for each stream key.
This is the basic form of reading streams.
For more advanced control, like blocking, limiting, or reading by consumer group,
see xread_options. Read more
sourcefn xread_options<K, ID, RV>(
&mut self,
keys: &'a [K],
ids: &'a [ID],
options: &'a StreamReadOptions
) -> Result<RV, RedisError> where
K: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
fn xread_options<K, ID, RV>(
&mut self,
keys: &'a [K],
ids: &'a [ID],
options: &'a StreamReadOptions
) -> Result<RV, RedisError> where
K: ToRedisArgs,
ID: ToRedisArgs,
RV: FromRedisValue,
This method handles setting optional arguments for
XREAD or XREADGROUP Redis commands. Read more
sourcefn xrevrange<K, E, S, RV>(
&mut self,
key: K,
end: E,
start: S
) -> Result<RV, RedisError> where
K: ToRedisArgs,
E: ToRedisArgs,
S: ToRedisArgs,
RV: FromRedisValue,
fn xrevrange<K, E, S, RV>(
&mut self,
key: K,
end: E,
start: S
) -> Result<RV, RedisError> where
K: ToRedisArgs,
E: ToRedisArgs,
S: ToRedisArgs,
RV: FromRedisValue,
This is the reverse version of xrange.
The same rules apply for start and end here. Read more
sourcefn xrevrange_all<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn xrevrange_all<K, RV>(&mut self, key: K) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
This is the reverse version of xrange_all.
The same rules apply for start and end here. Read more
sourcefn xrevrange_count<K, E, S, C, RV>(
&mut self,
key: K,
end: E,
start: S,
count: C
) -> Result<RV, RedisError> where
K: ToRedisArgs,
E: ToRedisArgs,
S: ToRedisArgs,
C: ToRedisArgs,
RV: FromRedisValue,
fn xrevrange_count<K, E, S, C, RV>(
&mut self,
key: K,
end: E,
start: S,
count: C
) -> Result<RV, RedisError> where
K: ToRedisArgs,
E: ToRedisArgs,
S: ToRedisArgs,
C: ToRedisArgs,
RV: FromRedisValue,
This is the reverse version of xrange_count.
The same rules apply for start and end here. Read more
sourcefn xtrim<K, RV>(
&mut self,
key: K,
maxlen: StreamMaxlen
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn xtrim<K, RV>(
&mut self,
key: K,
maxlen: StreamMaxlen
) -> Result<RV, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Trim a stream key to a MAXLEN count. Read more
sourcefn scan<RV>(&mut self) -> Result<Iter<'_, RV>, RedisError> where
RV: FromRedisValue,
fn scan<RV>(&mut self) -> Result<Iter<'_, RV>, RedisError> where
RV: FromRedisValue,
Incrementally iterate the keys space.
sourcefn scan_match<P, RV>(&mut self, pattern: P) -> Result<Iter<'_, RV>, RedisError> where
P: ToRedisArgs,
RV: FromRedisValue,
fn scan_match<P, RV>(&mut self, pattern: P) -> Result<Iter<'_, RV>, RedisError> where
P: ToRedisArgs,
RV: FromRedisValue,
Incrementally iterate the keys space for keys matching a pattern.
sourcefn hscan<K, RV>(&mut self, key: K) -> Result<Iter<'_, RV>, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn hscan<K, RV>(&mut self, key: K) -> Result<Iter<'_, RV>, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Incrementally iterate hash fields and associated values.
sourcefn hscan_match<K, P, RV>(
&mut self,
key: K,
pattern: P
) -> Result<Iter<'_, RV>, RedisError> where
K: ToRedisArgs,
P: ToRedisArgs,
RV: FromRedisValue,
fn hscan_match<K, P, RV>(
&mut self,
key: K,
pattern: P
) -> Result<Iter<'_, RV>, RedisError> where
K: ToRedisArgs,
P: ToRedisArgs,
RV: FromRedisValue,
Incrementally iterate hash fields and associated values for field names matching a pattern. Read more
sourcefn sscan<K, RV>(&mut self, key: K) -> Result<Iter<'_, RV>, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn sscan<K, RV>(&mut self, key: K) -> Result<Iter<'_, RV>, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Incrementally iterate set elements.
sourcefn sscan_match<K, P, RV>(
&mut self,
key: K,
pattern: P
) -> Result<Iter<'_, RV>, RedisError> where
K: ToRedisArgs,
P: ToRedisArgs,
RV: FromRedisValue,
fn sscan_match<K, P, RV>(
&mut self,
key: K,
pattern: P
) -> Result<Iter<'_, RV>, RedisError> where
K: ToRedisArgs,
P: ToRedisArgs,
RV: FromRedisValue,
Incrementally iterate set elements for elements matching a pattern.
sourcefn zscan<K, RV>(&mut self, key: K) -> Result<Iter<'_, RV>, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
fn zscan<K, RV>(&mut self, key: K) -> Result<Iter<'_, RV>, RedisError> where
K: ToRedisArgs,
RV: FromRedisValue,
Incrementally iterate sorted set elements.
sourcefn zscan_match<K, P, RV>(
&mut self,
key: K,
pattern: P
) -> Result<Iter<'_, RV>, RedisError> where
K: ToRedisArgs,
P: ToRedisArgs,
RV: FromRedisValue,
fn zscan_match<K, P, RV>(
&mut self,
key: K,
pattern: P
) -> Result<Iter<'_, RV>, RedisError> where
K: ToRedisArgs,
P: ToRedisArgs,
RV: FromRedisValue,
Incrementally iterate sorted set elements for elements matching a pattern.