pub enum UniversalConnection {
Client(Connection),
Cluster(ClusterConnection),
}
Variants§
Client(Connection)
Cluster(ClusterConnection)
Trait Implementations§
Source§impl ConnectionLike for UniversalConnection
impl ConnectionLike for UniversalConnection
Source§fn 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.
Source§fn 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.Source§fn 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.
Source§fn check_connection(&mut self) -> bool
fn check_connection(&mut self) -> bool
Check that all connections it has are available (
PING
internally).Source§fn 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 !Freeze for UniversalConnection
impl !RefUnwindSafe for UniversalConnection
impl Send for UniversalConnection
impl !Sync for UniversalConnection
impl Unpin for UniversalConnection
impl !UnwindSafe for UniversalConnection
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
Source§impl<T> Commands for Twhere
T: ConnectionLike,
impl<T> Commands for Twhere
T: ConnectionLike,
Source§fn get<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn get<RV, 'a, K>(&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
.Source§fn keys<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn keys<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Gets all keys matching pattern
Source§fn set<RV, 'a, K, V>(&mut self, key: K, value: V) -> Result<RV, RedisError>
fn set<RV, 'a, K, V>(&mut self, key: K, value: V) -> Result<RV, RedisError>
Set the string value of a key.
Source§fn set_multiple<RV, 'a, K, V>(
&mut self,
items: &'a [(K, V)],
) -> Result<RV, RedisError>
fn set_multiple<RV, 'a, K, V>( &mut self, items: &'a [(K, V)], ) -> Result<RV, RedisError>
Sets multiple keys to their values.
Source§fn set_ex<RV, 'a, K, V>(
&mut self,
key: K,
value: V,
seconds: usize,
) -> Result<RV, RedisError>
fn set_ex<RV, 'a, K, V>( &mut self, key: K, value: V, seconds: usize, ) -> Result<RV, RedisError>
Set the value and expiration of a key.
Source§fn pset_ex<RV, 'a, K, V>(
&mut self,
key: K,
value: V,
milliseconds: usize,
) -> Result<RV, RedisError>
fn pset_ex<RV, 'a, K, V>( &mut self, key: K, value: V, milliseconds: usize, ) -> Result<RV, RedisError>
Set the value and expiration in milliseconds of a key.
Source§fn set_nx<RV, 'a, K, V>(&mut self, key: K, value: V) -> Result<RV, RedisError>
fn set_nx<RV, 'a, K, V>(&mut self, key: K, value: V) -> Result<RV, RedisError>
Set the value of a key, only if the key does not exist
Source§fn mset_nx<RV, 'a, K, V>(
&mut self,
items: &'a [(K, V)],
) -> Result<RV, RedisError>
fn mset_nx<RV, 'a, K, V>( &mut self, items: &'a [(K, V)], ) -> Result<RV, RedisError>
Sets multiple keys to their values failing if at least one already exists.
Source§fn getset<RV, 'a, K, V>(&mut self, key: K, value: V) -> Result<RV, RedisError>
fn getset<RV, 'a, K, V>(&mut self, key: K, value: V) -> Result<RV, RedisError>
Set the string value of a key and return its old value.
Source§fn getrange<RV, 'a, K>(
&mut self,
key: K,
from: isize,
to: isize,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn getrange<RV, 'a, K>(
&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.
Source§fn setrange<RV, 'a, K, V>(
&mut self,
key: K,
offset: isize,
value: V,
) -> Result<RV, RedisError>
fn setrange<RV, 'a, K, V>( &mut self, key: K, offset: isize, value: V, ) -> Result<RV, RedisError>
Overwrite the part of the value stored in key at the specified offset.
Source§fn del<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn del<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Delete one or more keys.
Source§fn exists<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn exists<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Determine if a key exists.
Source§fn expire<RV, 'a, K>(
&mut self,
key: K,
seconds: usize,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn expire<RV, 'a, K>(
&mut self,
key: K,
seconds: usize,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Set a key’s time to live in seconds.
Source§fn expire_at<RV, 'a, K>(&mut self, key: K, ts: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn expire_at<RV, 'a, K>(&mut self, key: K, ts: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Set the expiration for a key as a UNIX timestamp.
Source§fn pexpire<RV, 'a, K>(&mut self, key: K, ms: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn pexpire<RV, 'a, K>(&mut self, key: K, ms: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Set a key’s time to live in milliseconds.
Source§fn pexpire_at<RV, 'a, K>(&mut self, key: K, ts: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn pexpire_at<RV, 'a, K>(&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.
Source§fn persist<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn persist<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Remove the expiration from a key.
Source§fn ttl<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn ttl<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get the expiration time of a key.
Source§fn pttl<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn pttl<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get the expiration time of a key in milliseconds.
Source§fn rename<RV, 'a, K>(&mut self, key: K, new_key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn rename<RV, 'a, K>(&mut self, key: K, new_key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Rename a key.
Source§fn rename_nx<RV, 'a, K>(&mut self, key: K, new_key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn rename_nx<RV, 'a, K>(&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.
Source§fn unlink<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn unlink<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Unlink one or more keys.
Source§fn append<RV, 'a, K, V>(&mut self, key: K, value: V) -> Result<RV, RedisError>
fn append<RV, 'a, K, V>(&mut self, key: K, value: V) -> Result<RV, RedisError>
Append a value to a key.
Source§fn incr<RV, 'a, K, V>(&mut self, key: K, delta: V) -> Result<RV, RedisError>
fn incr<RV, 'a, K, V>(&mut self, key: K, delta: V) -> Result<RV, RedisError>
Increment the numeric value of a key by the given amount. This
issues a
INCRBY
or INCRBYFLOAT
depending on the type.Source§fn decr<RV, 'a, K, V>(&mut self, key: K, delta: V) -> Result<RV, RedisError>
fn decr<RV, 'a, K, V>(&mut self, key: K, delta: V) -> Result<RV, RedisError>
Decrement the numeric value of a key by the given amount.
Source§fn setbit<RV, 'a, K>(
&mut self,
key: K,
offset: usize,
value: bool,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn setbit<RV, 'a, K>(
&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.
Source§fn getbit<RV, 'a, K>(&mut self, key: K, offset: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn getbit<RV, 'a, K>(&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.
Source§fn bitcount<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn bitcount<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Count set bits in a string.
Source§fn bitcount_range<RV, 'a, K>(
&mut self,
key: K,
start: usize,
end: usize,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn bitcount_range<RV, 'a, K>(
&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.
Source§fn bit_and<RV, 'a, K>(
&mut self,
dstkey: K,
srckeys: K,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn bit_and<RV, 'a, K>(
&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.
Source§fn bit_or<RV, 'a, K>(&mut self, dstkey: K, srckeys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn bit_or<RV, 'a, K>(&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.
Source§fn bit_xor<RV, 'a, K>(
&mut self,
dstkey: K,
srckeys: K,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn bit_xor<RV, 'a, K>(
&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.
Source§fn bit_not<RV, 'a, K>(&mut self, dstkey: K, srckey: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn bit_not<RV, 'a, K>(&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.
Source§fn strlen<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn strlen<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get the length of the value stored in a key.
Source§fn hget<RV, 'a, K, F>(&mut self, key: K, field: F) -> Result<RV, RedisError>
fn hget<RV, 'a, K, F>(&mut self, key: K, field: F) -> Result<RV, RedisError>
Gets a single (or multiple) fields from a hash.
Source§fn hdel<RV, 'a, K, F>(&mut self, key: K, field: F) -> Result<RV, RedisError>
fn hdel<RV, 'a, K, F>(&mut self, key: K, field: F) -> Result<RV, RedisError>
Deletes a single (or multiple) fields from a hash.
Source§fn hset<RV, 'a, K, F, V>(
&mut self,
key: K,
field: F,
value: V,
) -> Result<RV, RedisError>
fn hset<RV, 'a, K, F, V>( &mut self, key: K, field: F, value: V, ) -> Result<RV, RedisError>
Sets a single field in a hash.
Source§fn hset_nx<RV, 'a, K, F, V>(
&mut self,
key: K,
field: F,
value: V,
) -> Result<RV, RedisError>
fn hset_nx<RV, 'a, K, F, V>( &mut self, key: K, field: F, value: V, ) -> Result<RV, RedisError>
Sets a single field in a hash if it does not exist.
Source§fn hset_multiple<RV, 'a, K, F, V>(
&mut self,
key: K,
items: &'a [(F, V)],
) -> Result<RV, RedisError>
fn hset_multiple<RV, 'a, K, F, V>( &mut self, key: K, items: &'a [(F, V)], ) -> Result<RV, RedisError>
Sets a multiple fields in a hash.
Source§fn hincr<RV, 'a, K, F, D>(
&mut self,
key: K,
field: F,
delta: D,
) -> Result<RV, RedisError>
fn hincr<RV, 'a, K, F, D>( &mut self, key: K, field: F, delta: D, ) -> Result<RV, RedisError>
Increments a value.
Source§fn hexists<RV, 'a, K, F>(&mut self, key: K, field: F) -> Result<RV, RedisError>
fn hexists<RV, 'a, K, F>(&mut self, key: K, field: F) -> Result<RV, RedisError>
Checks if a field in a hash exists.
Source§fn hkeys<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn hkeys<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Gets all the keys in a hash.
Source§fn hvals<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn hvals<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Gets all the values in a hash.
Source§fn hgetall<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn hgetall<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Gets all the fields and values in a hash.
Source§fn hlen<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn hlen<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Gets the length of a hash.
Source§fn blpop<RV, 'a, K>(&mut self, key: K, timeout: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn blpop<RV, 'a, K>(&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.
Source§fn brpop<RV, 'a, K>(&mut self, key: K, timeout: usize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn brpop<RV, 'a, K>(&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.
Source§fn brpoplpush<RV, 'a, K>(
&mut self,
srckey: K,
dstkey: K,
timeout: usize,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn brpoplpush<RV, 'a, K>(
&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.
Source§fn lindex<RV, 'a, K>(&mut self, key: K, index: isize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn lindex<RV, 'a, K>(&mut self, key: K, index: isize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get an element from a list by its index.
Source§fn linsert_before<RV, 'a, K, P, V>(
&mut self,
key: K,
pivot: P,
value: V,
) -> Result<RV, RedisError>
fn linsert_before<RV, 'a, K, P, V>( &mut self, key: K, pivot: P, value: V, ) -> Result<RV, RedisError>
Insert an element before another element in a list.
Source§fn linsert_after<RV, 'a, K, P, V>(
&mut self,
key: K,
pivot: P,
value: V,
) -> Result<RV, RedisError>
fn linsert_after<RV, 'a, K, P, V>( &mut self, key: K, pivot: P, value: V, ) -> Result<RV, RedisError>
Insert an element after another element in a list.
Source§fn llen<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn llen<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Returns the length of the list stored at key.
Source§fn lpop<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn lpop<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Removes and returns the first element of the list stored at key.
Source§fn lpos<RV, 'a, K, V>(
&mut self,
key: K,
value: V,
options: LposOptions,
) -> Result<RV, RedisError>
fn lpos<RV, 'a, K, V>( &mut self, key: K, value: V, options: LposOptions, ) -> Result<RV, RedisError>
Returns the index of the first matching value of the list stored at key.
Source§fn lpush<RV, 'a, K, V>(&mut self, key: K, value: V) -> Result<RV, RedisError>
fn lpush<RV, 'a, K, V>(&mut self, key: K, value: V) -> Result<RV, RedisError>
Insert all the specified values at the head of the list stored at key.
Source§fn lpush_exists<RV, 'a, K, V>(
&mut self,
key: K,
value: V,
) -> Result<RV, RedisError>
fn lpush_exists<RV, 'a, K, V>( &mut self, key: K, value: V, ) -> Result<RV, RedisError>
Inserts a value at the head of the list stored at key, only if key
already exists and holds a list.
Source§fn lrange<RV, 'a, K>(
&mut self,
key: K,
start: isize,
stop: isize,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn lrange<RV, 'a, K>(
&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.
Source§fn lrem<RV, 'a, K, V>(
&mut self,
key: K,
count: isize,
value: V,
) -> Result<RV, RedisError>
fn lrem<RV, 'a, K, V>( &mut self, key: K, count: isize, value: V, ) -> Result<RV, RedisError>
Removes the first count occurrences of elements equal to value
from the list stored at key.
Source§fn ltrim<RV, 'a, K>(
&mut self,
key: K,
start: isize,
stop: isize,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn ltrim<RV, 'a, K>(
&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.
Source§fn lset<RV, 'a, K, V>(
&mut self,
key: K,
index: isize,
value: V,
) -> Result<RV, RedisError>
fn lset<RV, 'a, K, V>( &mut self, key: K, index: isize, value: V, ) -> Result<RV, RedisError>
Sets the list element at index to value
Source§fn rpop<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn rpop<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Removes and returns the last element of the list stored at key.
Source§fn rpoplpush<RV, 'a, K>(&mut self, key: K, dstkey: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn rpoplpush<RV, 'a, K>(&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.
Source§fn rpush<RV, 'a, K, V>(&mut self, key: K, value: V) -> Result<RV, RedisError>
fn rpush<RV, 'a, K, V>(&mut self, key: K, value: V) -> Result<RV, RedisError>
Insert all the specified values at the tail of the list stored at key.
Source§fn rpush_exists<RV, 'a, K, V>(
&mut self,
key: K,
value: V,
) -> Result<RV, RedisError>
fn rpush_exists<RV, 'a, K, V>( &mut self, key: K, value: V, ) -> Result<RV, RedisError>
Inserts value at the tail of the list stored at key, only if key
already exists and holds a list.
Source§fn sadd<RV, 'a, K, M>(&mut self, key: K, member: M) -> Result<RV, RedisError>
fn sadd<RV, 'a, K, M>(&mut self, key: K, member: M) -> Result<RV, RedisError>
Add one or more members to a set.
Source§fn scard<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn scard<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get the number of members in a set.
Source§fn sdiff<RV, 'a, K>(&mut self, keys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn sdiff<RV, 'a, K>(&mut self, keys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Subtract multiple sets.
Source§fn sdiffstore<RV, 'a, K>(
&mut self,
dstkey: K,
keys: K,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn sdiffstore<RV, 'a, K>(
&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.
Source§fn sinter<RV, 'a, K>(&mut self, keys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn sinter<RV, 'a, K>(&mut self, keys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Intersect multiple sets.
Source§fn sinterstore<RV, 'a, K>(
&mut self,
dstkey: K,
keys: K,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn sinterstore<RV, 'a, K>(
&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.
Source§fn sismember<RV, 'a, K, M>(
&mut self,
key: K,
member: M,
) -> Result<RV, RedisError>
fn sismember<RV, 'a, K, M>( &mut self, key: K, member: M, ) -> Result<RV, RedisError>
Determine if a given value is a member of a set.
Source§fn smembers<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn smembers<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get all the members in a set.
Source§fn smove<RV, 'a, K, M>(
&mut self,
srckey: K,
dstkey: K,
member: M,
) -> Result<RV, RedisError>
fn smove<RV, 'a, K, M>( &mut self, srckey: K, dstkey: K, member: M, ) -> Result<RV, RedisError>
Move a member from one set to another.
Source§fn spop<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn spop<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Remove and return a random member from a set.
Source§fn srandmember<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn srandmember<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get one random member from a set.
Source§fn srandmember_multiple<RV, 'a, K>(
&mut self,
key: K,
count: usize,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn srandmember_multiple<RV, 'a, K>(
&mut self,
key: K,
count: usize,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get multiple random members from a set.
Source§fn srem<RV, 'a, K, M>(&mut self, key: K, member: M) -> Result<RV, RedisError>
fn srem<RV, 'a, K, M>(&mut self, key: K, member: M) -> Result<RV, RedisError>
Remove one or more members from a set.
Source§fn sunion<RV, 'a, K>(&mut self, keys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn sunion<RV, 'a, K>(&mut self, keys: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Add multiple sets.
Source§fn sunionstore<RV, 'a, K>(
&mut self,
dstkey: K,
keys: K,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn sunionstore<RV, 'a, K>(
&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.
Source§fn zadd<RV, 'a, K, S, M>(
&mut self,
key: K,
member: M,
score: S,
) -> Result<RV, RedisError>
fn zadd<RV, 'a, K, S, M>( &mut self, key: K, member: M, score: S, ) -> Result<RV, RedisError>
Add one member to a sorted set, or update its score if it already exists.
Source§fn zadd_multiple<RV, 'a, K, S, M>(
&mut self,
key: K,
items: &'a [(S, M)],
) -> Result<RV, RedisError>
fn zadd_multiple<RV, 'a, K, S, M>( &mut self, key: K, items: &'a [(S, M)], ) -> Result<RV, RedisError>
Add multiple members to a sorted set, or update its score if it already exists.
Source§fn zcard<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zcard<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Get the number of members in a sorted set.
Source§fn zcount<RV, 'a, K, M, MM>(
&mut self,
key: K,
min: M,
max: MM,
) -> Result<RV, RedisError>
fn zcount<RV, 'a, K, M, MM>( &mut self, key: K, min: M, max: MM, ) -> Result<RV, RedisError>
Count the members in a sorted set with scores within the given values.
Source§fn zincr<RV, 'a, K, M, D>(
&mut self,
key: K,
member: M,
delta: D,
) -> Result<RV, RedisError>
fn zincr<RV, 'a, K, M, D>( &mut self, key: K, member: M, delta: D, ) -> Result<RV, RedisError>
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.
Source§fn zinterstore<RV, 'a, K>(
&mut self,
dstkey: K,
keys: &'a [K],
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zinterstore<RV, 'a, K>(
&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.
Source§fn zinterstore_min<RV, 'a, K>(
&mut self,
dstkey: K,
keys: &'a [K],
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zinterstore_min<RV, 'a, K>(
&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.
Source§fn zinterstore_max<RV, 'a, K>(
&mut self,
dstkey: K,
keys: &'a [K],
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zinterstore_max<RV, 'a, K>(
&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.
Source§fn zlexcount<RV, 'a, K, L>(
&mut self,
key: K,
min: L,
max: L,
) -> Result<RV, RedisError>
fn zlexcount<RV, 'a, K, L>( &mut self, key: K, min: L, max: L, ) -> Result<RV, RedisError>
Count the number of members in a sorted set between a given lexicographical range.
Source§fn zpopmax<RV, 'a, K>(&mut self, key: K, count: isize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zpopmax<RV, 'a, K>(&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
Source§fn zpopmin<RV, 'a, K>(&mut self, key: K, count: isize) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zpopmin<RV, 'a, K>(&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
Source§fn zrange<RV, 'a, K>(
&mut self,
key: K,
start: isize,
stop: isize,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zrange<RV, 'a, K>(
&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
Source§fn zrange_withscores<RV, 'a, K>(
&mut self,
key: K,
start: isize,
stop: isize,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zrange_withscores<RV, 'a, K>(
&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.
Source§fn zrangebylex<RV, 'a, K, M, MM>(
&mut self,
key: K,
min: M,
max: MM,
) -> Result<RV, RedisError>
fn zrangebylex<RV, 'a, K, M, MM>( &mut self, key: K, min: M, max: MM, ) -> Result<RV, RedisError>
Return a range of members in a sorted set, by lexicographical range.
Source§fn zrangebylex_limit<RV, 'a, K, M, MM>(
&mut self,
key: K,
min: M,
max: MM,
offset: isize,
count: isize,
) -> Result<RV, RedisError>
fn zrangebylex_limit<RV, 'a, K, M, MM>( &mut self, key: K, min: M, max: MM, offset: isize, count: isize, ) -> Result<RV, RedisError>
Return a range of members in a sorted set, by lexicographical
range with offset and limit.
Source§fn zrevrangebylex<RV, 'a, K, MM, M>(
&mut self,
key: K,
max: MM,
min: M,
) -> Result<RV, RedisError>
fn zrevrangebylex<RV, 'a, K, MM, M>( &mut self, key: K, max: MM, min: M, ) -> Result<RV, RedisError>
Return a range of members in a sorted set, by lexicographical range.
Source§fn zrevrangebylex_limit<RV, 'a, K, MM, M>(
&mut self,
key: K,
max: MM,
min: M,
offset: isize,
count: isize,
) -> Result<RV, RedisError>
fn zrevrangebylex_limit<RV, 'a, K, MM, M>( &mut self, key: K, max: MM, min: M, offset: isize, count: isize, ) -> Result<RV, RedisError>
Return a range of members in a sorted set, by lexicographical
range with offset and limit.
Source§fn zrangebyscore<RV, 'a, K, M, MM>(
&mut self,
key: K,
min: M,
max: MM,
) -> Result<RV, RedisError>
fn zrangebyscore<RV, 'a, K, M, MM>( &mut self, key: K, min: M, max: MM, ) -> Result<RV, RedisError>
Return a range of members in a sorted set, by score.
Source§fn zrangebyscore_withscores<RV, 'a, K, M, MM>(
&mut self,
key: K,
min: M,
max: MM,
) -> Result<RV, RedisError>
fn zrangebyscore_withscores<RV, 'a, K, M, MM>( &mut self, key: K, min: M, max: MM, ) -> Result<RV, RedisError>
Return a range of members in a sorted set, by score with scores.
Source§fn zrangebyscore_limit<RV, 'a, K, M, MM>(
&mut self,
key: K,
min: M,
max: MM,
offset: isize,
count: isize,
) -> Result<RV, RedisError>
fn zrangebyscore_limit<RV, 'a, K, M, MM>( &mut self, key: K, min: M, max: MM, offset: isize, count: isize, ) -> Result<RV, RedisError>
Return a range of members in a sorted set, by score with limit.
Source§fn zrangebyscore_limit_withscores<RV, 'a, K, M, MM>(
&mut self,
key: K,
min: M,
max: MM,
offset: isize,
count: isize,
) -> Result<RV, RedisError>
fn zrangebyscore_limit_withscores<RV, 'a, K, M, MM>( &mut self, key: K, min: M, max: MM, offset: isize, count: isize, ) -> Result<RV, RedisError>
Return a range of members in a sorted set, by score with limit with scores.
Source§fn zrank<RV, 'a, K, M>(&mut self, key: K, member: M) -> Result<RV, RedisError>
fn zrank<RV, 'a, K, M>(&mut self, key: K, member: M) -> Result<RV, RedisError>
Determine the index of a member in a sorted set.
Source§fn zrem<RV, 'a, K, M>(&mut self, key: K, members: M) -> Result<RV, RedisError>
fn zrem<RV, 'a, K, M>(&mut self, key: K, members: M) -> Result<RV, RedisError>
Remove one or more members from a sorted set.
Source§fn zrembylex<RV, 'a, K, M, MM>(
&mut self,
key: K,
min: M,
max: MM,
) -> Result<RV, RedisError>
fn zrembylex<RV, 'a, K, M, MM>( &mut self, key: K, min: M, max: MM, ) -> Result<RV, RedisError>
Remove all members in a sorted set between the given lexicographical range.
Source§fn zremrangebyrank<RV, 'a, K>(
&mut self,
key: K,
start: isize,
stop: isize,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zremrangebyrank<RV, 'a, K>(
&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.
Source§fn zrembyscore<RV, 'a, K, M, MM>(
&mut self,
key: K,
min: M,
max: MM,
) -> Result<RV, RedisError>
fn zrembyscore<RV, 'a, K, M, MM>( &mut self, key: K, min: M, max: MM, ) -> Result<RV, RedisError>
Remove all members in a sorted set within the given scores.
Source§fn zrevrange<RV, 'a, K>(
&mut self,
key: K,
start: isize,
stop: isize,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zrevrange<RV, 'a, K>(
&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.
Source§fn zrevrange_withscores<RV, 'a, K>(
&mut self,
key: K,
start: isize,
stop: isize,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zrevrange_withscores<RV, 'a, K>(
&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.
Source§fn zrevrangebyscore<RV, 'a, K, MM, M>(
&mut self,
key: K,
max: MM,
min: M,
) -> Result<RV, RedisError>
fn zrevrangebyscore<RV, 'a, K, MM, M>( &mut self, key: K, max: MM, min: M, ) -> Result<RV, RedisError>
Return a range of members in a sorted set, by score.
Source§fn zrevrangebyscore_withscores<RV, 'a, K, MM, M>(
&mut self,
key: K,
max: MM,
min: M,
) -> Result<RV, RedisError>
fn zrevrangebyscore_withscores<RV, 'a, K, MM, M>( &mut self, key: K, max: MM, min: M, ) -> Result<RV, RedisError>
Return a range of members in a sorted set, by score with scores.
Source§fn zrevrangebyscore_limit<RV, 'a, K, MM, M>(
&mut self,
key: K,
max: MM,
min: M,
offset: isize,
count: isize,
) -> Result<RV, RedisError>
fn zrevrangebyscore_limit<RV, 'a, K, MM, M>( &mut self, key: K, max: MM, min: M, offset: isize, count: isize, ) -> Result<RV, RedisError>
Return a range of members in a sorted set, by score with limit.
Source§fn zrevrangebyscore_limit_withscores<RV, 'a, K, MM, M>(
&mut self,
key: K,
max: MM,
min: M,
offset: isize,
count: isize,
) -> Result<RV, RedisError>
fn zrevrangebyscore_limit_withscores<RV, 'a, K, MM, M>( &mut self, key: K, max: MM, min: M, offset: isize, count: isize, ) -> Result<RV, RedisError>
Return a range of members in a sorted set, by score with limit with scores.
Source§fn zrevrank<RV, 'a, K, M>(
&mut self,
key: K,
member: M,
) -> Result<RV, RedisError>
fn zrevrank<RV, 'a, K, M>( &mut self, key: K, member: M, ) -> Result<RV, RedisError>
Determine the index of a member in a sorted set, with scores ordered from high to low.
Source§fn zscore<RV, 'a, K, M>(&mut self, key: K, member: M) -> Result<RV, RedisError>
fn zscore<RV, 'a, K, M>(&mut self, key: K, member: M) -> Result<RV, RedisError>
Get the score associated with the given member in a sorted set.
Source§fn zunionstore<RV, 'a, K>(
&mut self,
dstkey: K,
keys: &'a [K],
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zunionstore<RV, 'a, K>(
&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.
Source§fn zunionstore_min<RV, 'a, K>(
&mut self,
dstkey: K,
keys: &'a [K],
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zunionstore_min<RV, 'a, K>(
&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.
Source§fn zunionstore_max<RV, 'a, K>(
&mut self,
dstkey: K,
keys: &'a [K],
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn zunionstore_max<RV, 'a, K>(
&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.
Source§fn pfadd<RV, 'a, K, E>(&mut self, key: K, element: E) -> Result<RV, RedisError>
fn pfadd<RV, 'a, K, E>(&mut self, key: K, element: E) -> Result<RV, RedisError>
Adds the specified elements to the specified HyperLogLog.
Source§fn pfcount<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn pfcount<RV, 'a, K>(&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).
Source§fn pfmerge<RV, 'a, K>(
&mut self,
dstkey: K,
srckeys: K,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn pfmerge<RV, 'a, K>(
&mut self,
dstkey: K,
srckeys: K,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Merge N different HyperLogLogs into a single one.
Source§fn publish<RV, 'a, K, E>(
&mut self,
channel: K,
message: E,
) -> Result<RV, RedisError>
fn publish<RV, 'a, K, E>( &mut self, channel: K, message: E, ) -> Result<RV, RedisError>
Posts a message to the given channel.
Source§fn acl_load<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_load<RV, 'a>(&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.
Source§fn acl_save<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_save<RV, 'a>(&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.
Source§fn acl_list<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_list<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
Shows the currently active ACL rules in the Redis server.
Source§fn acl_users<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_users<RV, 'a>(&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.
Source§fn acl_getuser<RV, 'a, K>(&mut self, username: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn acl_getuser<RV, 'a, K>(&mut self, username: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Returns all the rules defined for an existing ACL user.
Source§fn acl_setuser<RV, 'a, K>(&mut self, username: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn acl_setuser<RV, 'a, K>(&mut self, username: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Creates an ACL user without any privilege.
Source§fn acl_setuser_rules<RV, 'a, K>(
&mut self,
username: K,
rules: &'a [Rule],
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn acl_setuser_rules<RV, 'a, K>(
&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.
Source§fn acl_deluser<RV, 'a, K>(
&mut self,
usernames: &'a [K],
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn acl_deluser<RV, 'a, K>(
&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.
Source§fn acl_cat<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_cat<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
Shows the available ACL categories.
Source§fn acl_cat_categoryname<RV, 'a, K>(
&mut self,
categoryname: K,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn acl_cat_categoryname<RV, 'a, K>(
&mut self,
categoryname: K,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Shows all the Redis commands in the specified category.
Source§fn acl_genpass<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_genpass<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
Generates a 256-bits password starting from /dev/urandom if available.
Source§fn acl_genpass_bits<RV, 'a>(&mut self, bits: isize) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_genpass_bits<RV, 'a>(&mut self, bits: isize) -> Result<RV, RedisError>where
RV: FromRedisValue,
Generates a 1-to-1024-bits password starting from /dev/urandom if available.
Source§fn acl_whoami<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_whoami<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
Returns the username the current connection is authenticated with.
Source§fn acl_log<RV, 'a>(&mut self, count: isize) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_log<RV, 'a>(&mut self, count: isize) -> Result<RV, RedisError>where
RV: FromRedisValue,
Shows a list of recent ACL security events
Source§fn acl_log_reset<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_log_reset<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
Clears the ACL log.
Source§fn acl_help<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
fn acl_help<RV, 'a>(&mut self) -> Result<RV, RedisError>where
RV: FromRedisValue,
Returns a helpful text describing the different subcommands.
Source§fn geo_add<RV, 'a, K, M>(
&mut self,
key: K,
members: M,
) -> Result<RV, RedisError>
fn geo_add<RV, 'a, K, M>( &mut self, key: K, members: M, ) -> Result<RV, RedisError>
Adds the specified geospatial items to the specified key. Read more
Source§fn geo_dist<RV, 'a, K, M1, M2>(
&mut self,
key: K,
member1: M1,
member2: M2,
unit: Unit,
) -> Result<RV, RedisError>
fn geo_dist<RV, 'a, K, M1, M2>( &mut self, key: K, member1: M1, member2: M2, unit: Unit, ) -> Result<RV, RedisError>
Return the distance between two members in the geospatial index
represented by the sorted set. Read more
Source§fn geo_hash<RV, 'a, K, M>(
&mut self,
key: K,
members: M,
) -> Result<RV, RedisError>
fn geo_hash<RV, 'a, K, M>( &mut self, key: K, members: M, ) -> Result<RV, RedisError>
Source§fn geo_pos<RV, 'a, K, M>(
&mut self,
key: K,
members: M,
) -> Result<RV, RedisError>
fn geo_pos<RV, 'a, K, M>( &mut self, key: K, members: M, ) -> Result<RV, RedisError>
Return the positions of all the specified members of the geospatial
index represented by the sorted set at key. Read more
Source§fn geo_radius<RV, 'a, K>(
&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<RV, 'a, K>(
&mut self,
key: K,
longitude: f64,
latitude: f64,
radius: f64,
unit: Unit,
options: RadiusOptions,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Source§fn geo_radius_by_member<RV, 'a, K, M>(
&mut self,
key: K,
member: M,
radius: f64,
unit: Unit,
options: RadiusOptions,
) -> Result<RV, RedisError>
fn geo_radius_by_member<RV, 'a, K, M>( &mut self, key: K, member: M, radius: f64, unit: Unit, options: RadiusOptions, ) -> Result<RV, RedisError>
Retrieve members selected by distance with the center of
member
. The
member itself is always contained in the results.Source§fn xack<RV, 'a, K, G, I>(
&mut self,
key: K,
group: G,
ids: &'a [I],
) -> Result<RV, RedisError>
fn xack<RV, 'a, K, G, I>( &mut self, key: K, group: G, ids: &'a [I], ) -> Result<RV, RedisError>
Ack pending stream messages checked out by a consumer. Read more
Source§fn xadd<RV, 'a, K, ID, F, V>(
&mut self,
key: K,
id: ID,
items: &'a [(F, V)],
) -> Result<RV, RedisError>
fn xadd<RV, 'a, K, ID, F, V>( &mut self, key: K, id: ID, items: &'a [(F, V)], ) -> Result<RV, RedisError>
Source§fn xadd_map<RV, 'a, K, ID, BTM>(
&mut self,
key: K,
id: ID,
map: BTM,
) -> Result<RV, RedisError>
fn xadd_map<RV, 'a, K, ID, BTM>( &mut self, key: K, id: ID, map: BTM, ) -> Result<RV, RedisError>
BTreeMap variant for adding a stream message by
key
.
Use *
as the id
for the current timestamp. Read moreSource§fn xadd_maxlen<RV, 'a, K, ID, F, V>(
&mut self,
key: K,
maxlen: StreamMaxlen,
id: ID,
items: &'a [(F, V)],
) -> Result<RV, RedisError>
fn xadd_maxlen<RV, 'a, K, ID, F, V>( &mut self, key: K, maxlen: StreamMaxlen, id: ID, items: &'a [(F, V)], ) -> Result<RV, RedisError>
Add a stream message while capping the stream at a maxlength. Read more
Source§fn xadd_maxlen_map<RV, 'a, K, ID, BTM>(
&mut self,
key: K,
maxlen: StreamMaxlen,
id: ID,
map: BTM,
) -> Result<RV, RedisError>
fn xadd_maxlen_map<RV, 'a, K, ID, BTM>( &mut self, key: K, maxlen: StreamMaxlen, id: ID, map: BTM, ) -> Result<RV, RedisError>
BTreeMap variant for adding a stream message while capping the stream at a maxlength. Read more
Source§fn xclaim<RV, 'a, K, G, C, MIT, ID>(
&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<RV, 'a, K, G, C, MIT, ID>(
&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
Source§fn xclaim_options<RV, 'a, K, G, C, MIT, ID>(
&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<RV, 'a, K, G, C, MIT, ID>(
&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
Source§fn xgroup_create<RV, 'a, K, G, ID>(
&mut self,
key: K,
group: G,
id: ID,
) -> Result<RV, RedisError>
fn xgroup_create<RV, 'a, K, G, ID>( &mut self, key: K, group: G, id: ID, ) -> Result<RV, RedisError>
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 moreSource§fn xgroup_create_mkstream<RV, 'a, K, G, ID>(
&mut self,
key: K,
group: G,
id: ID,
) -> Result<RV, RedisError>
fn xgroup_create_mkstream<RV, 'a, K, G, ID>( &mut self, key: K, group: G, id: ID, ) -> Result<RV, RedisError>
This is the alternate version for creating a consumer
group
which makes the stream if it doesn’t exist. Read moreSource§fn xgroup_setid<RV, 'a, K, G, ID>(
&mut self,
key: K,
group: G,
id: ID,
) -> Result<RV, RedisError>
fn xgroup_setid<RV, 'a, K, G, ID>( &mut self, key: K, group: G, id: ID, ) -> Result<RV, RedisError>
Source§fn xgroup_destroy<RV, 'a, K, G>(
&mut self,
key: K,
group: G,
) -> Result<RV, RedisError>
fn xgroup_destroy<RV, 'a, K, G>( &mut self, key: K, group: G, ) -> Result<RV, RedisError>
Source§fn xgroup_delconsumer<RV, 'a, K, G, C>(
&mut self,
key: K,
group: G,
consumer: C,
) -> Result<RV, RedisError>
fn xgroup_delconsumer<RV, 'a, K, G, C>( &mut self, key: K, group: G, consumer: C, ) -> Result<RV, RedisError>
Source§fn xinfo_consumers<RV, 'a, K, G>(
&mut self,
key: K,
group: G,
) -> Result<RV, RedisError>
fn xinfo_consumers<RV, 'a, K, G>( &mut self, key: K, group: G, ) -> Result<RV, RedisError>
This returns all info details about
which consumers have read messages for given consumer
group
.
Take note of the StreamInfoConsumersReply return type. Read moreSource§fn xinfo_groups<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn xinfo_groups<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Returns all consumer
group
s created for a given stream key
.
Take note of the StreamInfoGroupsReply return type. Read moreSource§fn xinfo_stream<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn xinfo_stream<RV, 'a, K>(&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 moreSource§fn xlen<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn xlen<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Returns the number of messages for a given stream
key
. Read moreSource§fn xpending<RV, 'a, K, G>(&mut self, key: K, group: G) -> Result<RV, RedisError>
fn xpending<RV, 'a, K, G>(&mut self, key: K, group: G) -> Result<RV, RedisError>
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 moreSource§fn xpending_count<RV, 'a, K, G, S, E, C>(
&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<RV, 'a, K, G, S, E, C>(
&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
Source§fn xpending_consumer_count<RV, 'a, K, G, S, E, C, CN>(
&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<RV, 'a, K, G, S, E, C, CN>(
&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,
Source§fn xrange<RV, 'a, K, S, E>(
&mut self,
key: K,
start: S,
end: E,
) -> Result<RV, RedisError>
fn xrange<RV, 'a, K, S, E>( &mut self, key: K, start: S, end: E, ) -> Result<RV, RedisError>
Returns a range of messages in a given stream
key
. Read moreSource§fn xrange_all<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn xrange_all<RV, 'a, K>(&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 moreSource§fn xrange_count<RV, 'a, K, S, E, C>(
&mut self,
key: K,
start: S,
end: E,
count: C,
) -> Result<RV, RedisError>
fn xrange_count<RV, 'a, K, S, E, C>( &mut self, key: K, start: S, end: E, count: C, ) -> Result<RV, RedisError>
A method for paginating a stream by
key
. Read moreSource§fn xread<RV, 'a, K, ID>(
&mut self,
keys: &'a [K],
ids: &'a [ID],
) -> Result<RV, RedisError>
fn xread<RV, 'a, K, ID>( &mut self, keys: &'a [K], ids: &'a [ID], ) -> Result<RV, RedisError>
Read a list of
id
s 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 moreSource§fn xread_options<RV, 'a, K, ID>(
&mut self,
keys: &'a [K],
ids: &'a [ID],
options: StreamReadOptions,
) -> Result<RV, RedisError>
fn xread_options<RV, 'a, K, ID>( &mut self, keys: &'a [K], ids: &'a [ID], options: StreamReadOptions, ) -> Result<RV, RedisError>
Source§fn xrevrange<RV, 'a, K, E, S>(
&mut self,
key: K,
end: E,
start: S,
) -> Result<RV, RedisError>
fn xrevrange<RV, 'a, K, E, S>( &mut self, key: K, end: E, start: S, ) -> Result<RV, RedisError>
Source§fn xrevrange_all<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn xrevrange_all<RV, 'a, K>(&mut self, key: K) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Source§fn xrevrange_count<RV, 'a, K, E, S, C>(
&mut self,
key: K,
end: E,
start: S,
count: C,
) -> Result<RV, RedisError>
fn xrevrange_count<RV, 'a, K, E, S, C>( &mut self, key: K, end: E, start: S, count: C, ) -> Result<RV, RedisError>
Source§fn xtrim<RV, 'a, K>(
&mut self,
key: K,
maxlen: StreamMaxlen,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
fn xtrim<RV, 'a, K>(
&mut self,
key: K,
maxlen: StreamMaxlen,
) -> Result<RV, RedisError>where
K: ToRedisArgs,
RV: FromRedisValue,
Trim a stream
key
to a MAXLEN count. Read moreSource§fn 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.
Source§fn 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.
Source§fn 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.
Source§fn hscan_match<K, P, RV>(
&mut self,
key: K,
pattern: P,
) -> Result<Iter<'_, RV>, RedisError>
fn hscan_match<K, P, RV>( &mut self, key: K, pattern: P, ) -> Result<Iter<'_, RV>, RedisError>
Incrementally iterate hash fields and associated values for
field names matching a pattern.
Source§fn 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.
Source§fn sscan_match<K, P, RV>(
&mut self,
key: K,
pattern: P,
) -> Result<Iter<'_, RV>, RedisError>
fn sscan_match<K, P, RV>( &mut self, key: K, pattern: P, ) -> Result<Iter<'_, RV>, RedisError>
Incrementally iterate set elements for elements matching a pattern.
Source§fn 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.
Source§fn zscan_match<K, P, RV>(
&mut self,
key: K,
pattern: P,
) -> Result<Iter<'_, RV>, RedisError>
fn zscan_match<K, P, RV>( &mut self, key: K, pattern: P, ) -> Result<Iter<'_, RV>, RedisError>
Incrementally iterate sorted set elements for elements matching a pattern.