Connection in redis - Rust
Description: Represents a stateful redis TCP connection.

Skip to main content

## Connection

# Struct Connection

Source

    pub struct Connection { /* private fields */ }

Expand description

Represents a stateful redis TCP connection.

## Implementations§

Source§

### impl Connection

A connection is an object that represents a single redis connection. It provides basic support for sending encoded commands into a redis connection and to read a response from it. It’s bound to a single database and can only be created from the client.

You generally do not much with this object other than passing it to `Cmd` objects.

Source

#### pub fn send_packed_command(&mut self, cmd: &[u8]) -> RedisResult<()>

Sends an already encoded (packed) command into the TCP socket and does not read a response. This is useful for commands like `MONITOR` which yield multiple items. This needs to be used with care because it changes the state of the connection.

Source

#### pub fn recv_response(&mut self) -> RedisResult<Value>

Fetches a single response from the connection. This is useful if used in combination with `send_packed_command`.

Source

#### pub fn set_write_timeout(&self, dur: Option<Duration>) -> RedisResult<()>

Sets the write timeout for the connection.

If the provided value is `None`, then `send_packed_command` call will block indefinitely. It is an error to pass the zero `Duration` to this method.

Source

#### pub fn set_read_timeout(&self, dur: Option<Duration>) -> RedisResult<()>

Sets the read timeout for the connection.

If the provided value is `None`, then `recv_response` call will block indefinitely. It is an error to pass the zero `Duration` to this method.

Source

#### pub fn as_pubsub(&mut self) -> PubSub<'_>

Creates a `PubSub` instance for this connection.

Source

#### pub fn set_push_sender(&mut self, sender: Sender<PushInfo>)

Sets sender channel for push values.

Source

#### pub fn subscribe_resp3<T: ToRedisArgs>(&mut self, channel: T) -> RedisResult<()>

Subscribes to a new channel(s).

This only works if the connection was configured with ProtocolVersion::RESP3 and Self::set_push_sender.

Source

#### pub fn psubscribe_resp3<T: ToRedisArgs>( &mut self, pchannel: T, ) -> RedisResult<()>

Subscribes to new channel(s) with pattern(s).

This only works if the connection was configured with ProtocolVersion::RESP3 and Self::set_push_sender.

Source

#### pub fn unsubscribe_resp3<T: ToRedisArgs>( &mut self, channel: T, ) -> RedisResult<()>

Unsubscribes from a channel(s).

This only works if the connection was configured with ProtocolVersion::RESP3 and Self::set_push_sender.

Source

#### pub fn punsubscribe_resp3<T: ToRedisArgs>( &mut self, pchannel: T, ) -> RedisResult<()>

Unsubscribes from channel pattern(s).

This only works if the connection was configured with ProtocolVersion::RESP3 and Self::set_push_sender.

## Trait Implementations§

Source§

### impl Connect for Connection

Available on crate feature `cluster` only.
Source§

#### fn connect<T>(info: T, timeout: Option<Duration>) -> RedisResult<Self>
where T: IntoConnectionInfo,

Connect to a node, returning handle for command execution.
Source§

#### fn send_packed_command(&mut self, cmd: &[u8]) -> RedisResult<()>

Sends an already encoded (packed) command into the TCP socket and does not read a response. This is useful for commands like `MONITOR` which yield multiple items. This needs to be used with care because it changes the state of the connection.
Source§

#### fn set_write_timeout(&self, dur: Option<Duration>) -> RedisResult<()>

Sets the write timeout for the connection. Read more
Source§

#### fn set_read_timeout(&self, dur: Option<Duration>) -> RedisResult<()>

Sets the read timeout for the connection. Read more
Source§

#### fn recv_response(&mut self) -> RedisResult<Value>

Fetches a single response from the connection. This is useful if used in combination with `send_packed_command`.
Source§

### impl ConnectionLike for Connection

Source§

#### fn req_command(&mut self, cmd: &Cmd) -> RedisResult<Value>

Sends a Cmd into the TCP socket and reads a single response from it.

Source§

#### 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 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

Check that all connections it has are available (`PING` internally).
Source§

#### fn is_open(&self) -> bool

Returns the connection status. Read more
Source§

### impl PubSubCommands for Connection

Source§

#### fn subscribe<C, F, U>(&mut self, channels: C, func: F) -> RedisResult<U>
where F: FnMut(Msg) -> ControlFlow<U>, C: ToRedisArgs,

Subscribe to a list of channels using SUBSCRIBE and run the provided closure for each message received. Read more
Source§

#### fn psubscribe<P, F, U>(&mut self, patterns: P, func: F) -> RedisResult<U>
where F: FnMut(Msg) -> ControlFlow<U>, P: ToRedisArgs,

Subscribe to a list of channels using PSUBSCRIBE and run the provided closure for each message received. Read more

## Auto Trait Implementations§

§

### impl Freeze for Connection

§

### impl !RefUnwindSafe for Connection

§

### impl Send for Connection

§

### impl Sync for Connection

§

### impl Unpin for Connection

§

### impl !UnwindSafe for Connection

## Blanket Implementations§

Source§

### impl<T> Any for T
where T: 'static + ?Sized,

Source§

#### fn type_id(&self) -> TypeId

Gets the `TypeId` of `self`. Read more
Source§

### impl<T> Borrow<T> for T
where T: ?Sized,

Source§

#### fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

### impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

#### fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

### impl<T> Commands for T
where T: ConnectionLike,

Source§

#### fn get<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Get the value of a key. If key is a vec this becomes an `MGET` (if using `TypedCommands`, you should specifically use `mget` to get the correct return type. Redis Docs
Source§

#### fn mget<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Get values of keys Redis Docs
Source§

#### fn keys<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Gets all keys matching pattern Redis Docs
Source§

#### fn set<'a, K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, value: V, ) -> RedisResult<RV>

Set the string value of a key. Redis Docs
Source§

#### fn set_options<'a, K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, value: V, options: SetOptions, ) -> RedisResult<RV>

Set the string value of a key with options. Redis Docs
Source§

#### fn mset<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>( &mut self, items: &'a [(K, V)], ) -> RedisResult<RV>

Sets multiple keys to their values. Redis Docs
Source§

#### fn set_ex<'a, K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, value: V, seconds: u64, ) -> RedisResult<RV>

Set the value and expiration of a key. Redis Docs
Source§

#### fn pset_ex<'a, K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, value: V, milliseconds: u64, ) -> RedisResult<RV>

Set the value and expiration in milliseconds of a key. Redis Docs
Source§

#### fn set_nx<'a, K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, value: V, ) -> RedisResult<RV>

Set the value of a key, only if the key does not exist Redis Docs
Source§

#### fn mset_nx<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>( &mut self, items: &'a [(K, V)], ) -> RedisResult<RV>

Sets multiple keys to their values failing if at least one already exists. Redis Docs
Source§

#### fn mset_ex<'a, K: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>( &mut self, items: &'a [(K, V)], options: MSetOptions, ) -> RedisResult<RV>

Sets the given keys to their respective values. This command is an extension of the MSETNX that adds expiration and XX options. Redis Docs
Source§

#### fn getset<'a, K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, value: V, ) -> RedisResult<RV>

Set the string value of a key and return its old value. Redis Docs
Source§

#### fn getrange<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, from: isize, to: isize, ) -> RedisResult<RV>

Get a range of bytes/substring from the value of a key. Negative values provide an offset from the end of the value. Redis returns an empty string if the key doesn’t exist, not Nil Redis Docs
Source§

#### fn setrange<'a, K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, offset: isize, value: V, ) -> RedisResult<RV>

Overwrite the part of the value stored in key at the specified offset. Redis Docs
Source§

#### fn del<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Delete one or more keys. Returns the number of keys deleted. Redis Docs
Source§

#### fn del_ex<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, value_comparison: ValueComparison, ) -> RedisResult<RV>

Conditionally removes the specified key. A key is ignored if it does not exist. IFEQ `match-value` - Delete the key only if its value is equal to `match-value` IFNE `match-value` - Delete the key only if its value is not equal to `match-value` IFDEQ `match-digest` - Delete the key only if the digest of its value is equal to `match-digest` IFDNE `match-digest` - Delete the key only if the digest of its value is not equal to `match-digest` Redis Docs
Source§

#### fn digest<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Get the hex signature of the value stored in the specified key. For the digest, Redis will use XXH3 Redis Docs
Source§

#### fn exists<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Determine if a key exists. Redis Docs
Source§

#### fn key_type<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Determine the type of key. Redis Docs
Source§

#### fn expire<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, seconds: i64, ) -> RedisResult<RV>

Set a key’s time to live in seconds. Returns whether expiration was set. Redis Docs
Source§

#### fn expire_at<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ts: i64, ) -> RedisResult<RV>

Set the expiration for a key as a UNIX timestamp. Returns whether expiration was set. Redis Docs
Source§

#### fn pexpire<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ms: i64, ) -> RedisResult<RV>

Set a key’s time to live in milliseconds. Returns whether expiration was set. Redis Docs
Source§

#### fn pexpire_at<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ts: i64, ) -> RedisResult<RV>

Set the expiration for a key as a UNIX timestamp in milliseconds. Returns whether expiration was set. Redis Docs
Source§

#### fn expire_time<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Get the absolute Unix expiration timestamp in seconds. Returns `ExistsButNotRelevant` if key exists but has no expiration time. Redis Docs
Source§

#### fn pexpire_time<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Get the absolute Unix expiration timestamp in milliseconds. Returns `ExistsButNotRelevant` if key exists but has no expiration time. Redis Docs
Source§

#### fn persist<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Remove the expiration from a key. Returns whether a timeout was removed. Redis Docs
Source§

#### fn ttl<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Get the time to live for a key in seconds. Returns `ExistsButNotRelevant` if key exists but has no expiration time. Redis Docs
Source§

#### fn pttl<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Get the time to live for a key in milliseconds. Returns `ExistsButNotRelevant` if key exists but has no expiration time. Redis Docs
Source§

#### fn get_ex<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, expire_at: Expiry, ) -> RedisResult<RV>

Get the value of a key and set expiration Redis Docs
Source§

#### fn get_del<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Get the value of a key and delete it Redis Docs
Source§

#### fn copy<'a, KSrc: ToSingleRedisArg, KDst: ToSingleRedisArg, Db: ToString, RV: FromRedisValue>( &mut self, source: KSrc, destination: KDst, options: CopyOptions<Db>, ) -> RedisResult<RV>

Copy the value from one key to another, returning whether the copy was successful. Redis Docs
Source§

#### fn rename<'a, K: ToSingleRedisArg, N: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, new_key: N, ) -> RedisResult<RV>

Rename a key. Errors if key does not exist. Redis Docs
Source§

#### fn rename_nx<'a, K: ToSingleRedisArg, N: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, new_key: N, ) -> RedisResult<RV>

Rename a key, only if the new key does not exist. Errors if key does not exist. Returns whether the key was renamed, or false if the new key already exists. Redis Docs
Source§

#### fn unlink<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Unlink one or more keys. This is a non-blocking version of `DEL`. Returns number of keys unlinked. Redis Docs
Source§

#### fn append<'a, K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, value: V, ) -> RedisResult<RV>

Append a value to a key. Returns length of string after operation. Redis Docs
Source§

#### fn incr<'a, K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, delta: V, ) -> RedisResult<RV>

Increment the numeric value of a key by the given amount. This issues a `INCRBY` or `INCRBYFLOAT` depending on the type. If the key does not exist, it is set to 0 before performing the operation.
Source§

#### fn decr<'a, K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, delta: V, ) -> RedisResult<RV>

Decrement the numeric value of a key by the given amount. If the key does not exist, it is set to 0 before performing the operation. Redis Docs
Source§

#### fn setbit<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, offset: usize, value: bool, ) -> RedisResult<RV>

Sets or clears the bit at offset in the string value stored at key. Returns the original bit value stored at offset. Redis Docs
Source§

#### fn getbit<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, offset: usize, ) -> RedisResult<RV>

Returns the bit value at offset in the string value stored at key. Redis Docs
Source§

#### fn bitcount<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Count set bits in a string. Returns 0 if key does not exist. Redis Docs
Source§

#### fn bitcount_range<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, start: usize, end: usize, ) -> RedisResult<RV>

Count set bits in a string in a range. Returns 0 if key does not exist. Redis Docs
Source§

#### fn bit_and<'a, D: ToSingleRedisArg, S: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, srckeys: S, ) -> RedisResult<RV>

Perform a bitwise AND between multiple keys (containing string values) and store the result in the destination key. Returns size of destination string after operation. Redis Docs
Source§

#### fn bit_or<'a, D: ToSingleRedisArg, S: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, srckeys: S, ) -> RedisResult<RV>

Perform a bitwise OR between multiple keys (containing string values) and store the result in the destination key. Returns size of destination string after operation. Redis Docs
Source§

#### fn bit_xor<'a, D: ToSingleRedisArg, S: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, srckeys: S, ) -> RedisResult<RV>

Perform a bitwise XOR between multiple keys (containing string values) and store the result in the destination key. Returns size of destination string after operation. Redis Docs
Source§

#### fn bit_not<'a, D: ToSingleRedisArg, S: ToSingleRedisArg, RV: FromRedisValue>( &mut self, dstkey: D, srckey: S, ) -> RedisResult<RV>

Perform a bitwise NOT of the key (containing string values) and store the result in the destination key. Returns size of destination string after operation. Redis Docs
Source§

#### fn bit_diff<'a, D: ToSingleRedisArg, S: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, srckeys: S, ) -> RedisResult<RV>

DIFF(X, Y1, Y2, …)
Perform a set difference to extract the members of X that are not members of any of Y1, Y2,….
Logical representation: X ∧ ¬(Y1 ∨ Y2 ∨ …)
Redis Docs
Source§

#### fn bit_diff1<'a, D: ToSingleRedisArg, S: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, srckeys: S, ) -> RedisResult<RV>

DIFF1(X, Y1, Y2, …) (Relative complement difference)
Perform a relative complement set difference to extract the members of one or more of Y1, Y2,… that are not members of X.
Logical representation: ¬X ∧ (Y1 ∨ Y2 ∨ …)
Redis Docs
Source§

#### fn bit_and_or<'a, D: ToSingleRedisArg, S: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, srckeys: S, ) -> RedisResult<RV>

ANDOR(X, Y1, Y2, …)
Perform an “intersection of union(s)” operation to extract the members of X that are also members of one or more of Y1, Y2,….
Logical representation: X ∧ (Y1 ∨ Y2 ∨ …)
Redis Docs
Source§

#### fn bit_one<'a, D: ToSingleRedisArg, S: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, srckeys: S, ) -> RedisResult<RV>

ONE(X, Y1, Y2, …)
Perform an “exclusive membership” operation to extract the members of exactly one of X, Y1, Y2, ….
Logical representation: (X ∨ Y1 ∨ Y2 ∨ …) ∧ ¬((X ∧ Y1) ∨ (X ∧ Y2) ∨ (Y1 ∧ Y2) ∨ (Y1 ∧ Y3) ∨ …)
Redis Docs
Source§

#### fn strlen<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Get the length of the value stored in a key. 0 if key does not exist. Redis Docs
Source§

#### fn hget<'a, K: ToSingleRedisArg, F: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, field: F, ) -> RedisResult<RV>

Gets a single (or multiple) fields from a hash.
Source§

#### fn hmget<'a, K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, fields: F, ) -> RedisResult<RV>

Gets multiple fields from a hash. Redis Docs
Source§

#### fn hget_ex<'a, K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, fields: F, expire_at: Expiry, ) -> RedisResult<RV>

Get the value of one or more fields of a given hash key, and optionally set their expiration Redis Docs
Source§

#### fn hdel<'a, K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, field: F, ) -> RedisResult<RV>

Deletes a single (or multiple) fields from a hash. Returns number of fields deleted. Redis Docs
Source§

#### fn hget_del<'a, K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, fields: F, ) -> RedisResult<RV>

Get and delete the value of one or more fields of a given hash key Redis Docs
Source§

#### fn hset<'a, K: ToSingleRedisArg, F: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, field: F, value: V, ) -> RedisResult<RV>

Sets a single field in a hash. Returns number of fields added. Redis Docs
Source§

#### fn hset_ex<'a, K: ToSingleRedisArg, F: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, hash_field_expiration_options: &'a HashFieldExpirationOptions, fields_values: &'a [(F, V)], ) -> RedisResult<RV>

Set the value of one or more fields of a given hash key, and optionally set their expiration Redis Docs
Source§

#### fn hset_nx<'a, K: ToSingleRedisArg, F: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, field: F, value: V, ) -> RedisResult<RV>

Sets a single field in a hash if it does not exist. Returns whether the field was added. Redis Docs
Source§

#### fn hset_multiple<'a, K: ToSingleRedisArg, F: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, items: &'a [(F, V)], ) -> RedisResult<RV>

Sets multiple fields in a hash. Redis Docs
Source§

#### fn hincr<'a, K: ToSingleRedisArg, F: ToSingleRedisArg, D: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, field: F, delta: D, ) -> RedisResult<RV>

Increments a value. Returns the new value of the field after incrementation.
Source§

#### fn hexists<'a, K: ToSingleRedisArg, F: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, field: F, ) -> RedisResult<RV>

Checks if a field in a hash exists. Redis Docs
Source§

#### fn httl<'a, K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, fields: F, ) -> RedisResult<RV>

Get one or more fields’ TTL in seconds. Redis Docs
Source§

#### fn hpttl<'a, K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, fields: F, ) -> RedisResult<RV>

Get one or more fields’ TTL in milliseconds. Redis Docs
Source§

#### fn hexpire<'a, K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, seconds: i64, opt: ExpireOption, fields: F, ) -> RedisResult<RV>

Set one or more fields’ time to live in seconds. Returns an array where each element corresponds to the field at the same index in the fields argument. Each element of the array is either: 0 if the specified condition has not been met. 1 if the expiration time was updated. 2 if called with 0 seconds. Errors if provided key exists but is not a hash. Redis Docs
Source§

#### fn hexpire_at<'a, K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, ts: i64, opt: ExpireOption, fields: F, ) -> RedisResult<RV>

Set the expiration for one or more fields as a UNIX timestamp in seconds. Returns an array where each element corresponds to the field at the same index in the fields argument. Each element of the array is either: 0 if the specified condition has not been met. 1 if the expiration time was updated. 2 if called with a time in the past. Errors if provided key exists but is not a hash. Redis Docs
Source§

#### fn hexpire_time<'a, K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, fields: F, ) -> RedisResult<RV>

Returns the absolute Unix expiration timestamp in seconds. Redis Docs
Source§

#### fn hpersist<'a, K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, fields: F, ) -> RedisResult<RV>

Remove the expiration from a key. Returns 1 if the expiration was removed. Redis Docs
Source§

#### fn hpexpire<'a, K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, milliseconds: i64, opt: ExpireOption, fields: F, ) -> RedisResult<RV>

Set one or more fields’ time to live in milliseconds. Returns an array where each element corresponds to the field at the same index in the fields argument. Each element of the array is either: 0 if the specified condition has not been met. 1 if the expiration time was updated. 2 if called with 0 seconds. Errors if provided key exists but is not a hash. Redis Docs
Source§

#### fn hpexpire_at<'a, K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, ts: i64, opt: ExpireOption, fields: F, ) -> RedisResult<RV>

Set the expiration for one or more fields as a UNIX timestamp in milliseconds. Returns an array where each element corresponds to the field at the same index in the fields argument. Each element of the array is either: 0 if the specified condition has not been met. 1 if the expiration time was updated. 2 if called with a time in the past. Errors if provided key exists but is not a hash. Redis Docs
Source§

#### fn hpexpire_time<'a, K: ToSingleRedisArg, F: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, fields: F, ) -> RedisResult<RV>

Returns the absolute Unix expiration timestamp in seconds. Redis Docs
Source§

#### fn hkeys<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Gets all the keys in a hash. Redis Docs
Source§

#### fn hvals<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Gets all the values in a hash. Redis Docs
Source§

#### fn hgetall<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Gets all the fields and values in a hash. Redis Docs
Source§

#### fn hlen<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Gets the length of a hash. Returns 0 if key does not exist. Redis Docs
Source§

#### fn blmove<'a, S: ToSingleRedisArg, D: ToSingleRedisArg, RV: FromRedisValue>( &mut self, srckey: S, dstkey: D, src_dir: Direction, dst_dir: Direction, timeout: f64, ) -> RedisResult<RV>

Pop an element from a list, push it to another list and return it; or block until one is available Redis Docs
Source§

#### fn blmpop<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, timeout: f64, numkeys: usize, key: K, dir: Direction, count: usize, ) -> RedisResult<RV>

Pops `count` elements from the first non-empty list key from the list of provided key names; or blocks until one is available. Redis Docs
Source§

#### fn blpop<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, timeout: f64, ) -> RedisResult<RV>

Remove and get the first element in a list, or block until one is available. Redis Docs
Source§

#### fn brpop<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, timeout: f64, ) -> RedisResult<RV>

Remove and get the last element in a list, or block until one is available. Redis Docs
Source§

#### fn brpoplpush<'a, S: ToSingleRedisArg, D: ToSingleRedisArg, RV: FromRedisValue>( &mut self, srckey: S, dstkey: D, timeout: f64, ) -> RedisResult<RV>

Pop a value from a list, push it to another list and return it; or block until one is available. Redis Docs
Source§

#### fn lindex<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, index: isize, ) -> RedisResult<RV>

Get an element from a list by its index. Redis Docs
Source§

#### fn linsert_before<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, pivot: P, value: V, ) -> RedisResult<RV>

Insert an element before another element in a list. Redis Docs
Source§

#### fn linsert_after<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, pivot: P, value: V, ) -> RedisResult<RV>

Insert an element after another element in a list. Redis Docs
Source§

#### fn llen<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Returns the length of the list stored at key. Redis Docs
Source§

#### fn lmove<'a, S: ToSingleRedisArg, D: ToSingleRedisArg, RV: FromRedisValue>( &mut self, srckey: S, dstkey: D, src_dir: Direction, dst_dir: Direction, ) -> RedisResult<RV>

Pop an element a list, push it to another list and return it Redis Docs
Source§

#### fn lmpop<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, numkeys: usize, key: K, dir: Direction, count: usize, ) -> RedisResult<RV>

Pops `count` elements from the first non-empty list key from the list of provided key names. Redis Docs
Source§

#### fn lpop<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, count: Option<NonZeroUsize>, ) -> RedisResult<RV>

Removes and returns the up to `count` first elements of the list stored at key. Read more
Source§

#### fn lpos<'a, K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, value: V, options: LposOptions, ) -> RedisResult<RV>

Returns the index of the first matching value of the list stored at key. Redis Docs
Source§

#### fn lpush<'a, K: ToSingleRedisArg, V: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, value: V, ) -> RedisResult<RV>

Insert all the specified values at the head of the list stored at key. Redis Docs
Source§

#### fn lpush_exists<'a, K: ToSingleRedisArg, V: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, value: V, ) -> RedisResult<RV>

Inserts a value at the head of the list stored at key, only if key already exists and holds a list. Redis Docs
Source§

#### fn lrange<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, start: isize, stop: isize, ) -> RedisResult<RV>

Returns the specified elements of the list stored at key. Redis Docs
Source§

#### fn lrem<'a, K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, count: isize, value: V, ) -> RedisResult<RV>

Removes the first count occurrences of elements equal to value from the list stored at key. Redis Docs
Source§

#### fn ltrim<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, start: isize, stop: isize, ) -> RedisResult<RV>

Trim an existing list so that it will contain only the specified range of elements specified. Redis Docs
Source§

#### fn lset<'a, K: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, index: isize, value: V, ) -> RedisResult<RV>

Sets the list element at index to value Redis Docs
Source§

#### fn ping<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV>

Sends a ping to the server Redis Docs
Source§

#### fn ping_message<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, message: K, ) -> RedisResult<RV>

Sends a ping with a message to the server Redis Docs
Source§

#### fn rpop<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, count: Option<NonZeroUsize>, ) -> RedisResult<RV>

Removes and returns the up to `count` last elements of the list stored at key Read more
Source§

#### fn rpoplpush<'a, K: ToSingleRedisArg, D: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, dstkey: D, ) -> RedisResult<RV>

Pop a value from a list, push it to another list and return it. Redis Docs
Source§

#### fn rpush<'a, K: ToSingleRedisArg, V: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, value: V, ) -> RedisResult<RV>

Insert all the specified values at the tail of the list stored at key. Redis Docs
Source§

#### fn rpush_exists<'a, K: ToSingleRedisArg, V: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, value: V, ) -> RedisResult<RV>

Inserts value at the tail of the list stored at key, only if key already exists and holds a list. Redis Docs
Source§

#### fn sadd<'a, K: ToSingleRedisArg, M: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, member: M, ) -> RedisResult<RV>

Add one or more members to a set. Redis Docs
Source§

#### fn scard<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Get the number of members in a set. Redis Docs
Source§

#### fn sdiff<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, keys: K, ) -> RedisResult<RV>

Subtract multiple sets. Redis Docs
Source§

#### fn sdiffstore<'a, D: ToSingleRedisArg, K: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, keys: K, ) -> RedisResult<RV>

Subtract multiple sets and store the resulting set in a key. Redis Docs
Source§

#### fn sinter<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, keys: K, ) -> RedisResult<RV>

Intersect multiple sets. Redis Docs
Source§

#### fn sinterstore<'a, D: ToSingleRedisArg, K: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, keys: K, ) -> RedisResult<RV>

Intersect multiple sets and store the resulting set in a key. Redis Docs
Source§

#### fn sismember<'a, K: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, member: M, ) -> RedisResult<RV>

Determine if a given value is a member of a set. Redis Docs
Source§

#### fn smismember<'a, K: ToSingleRedisArg, M: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, members: M, ) -> RedisResult<RV>

Determine if given values are members of a set. Redis Docs
Source§

#### fn smembers<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Get all the members in a set. Redis Docs
Source§

#### fn smove<'a, S: ToSingleRedisArg, D: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue>( &mut self, srckey: S, dstkey: D, member: M, ) -> RedisResult<RV>

Move a member from one set to another. Redis Docs
Source§

#### fn spop<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Remove and return a random member from a set. Redis Docs
Source§

#### fn srandmember<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Get one random member from a set. Redis Docs
Source§

#### fn srandmember_multiple<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, count: isize, ) -> RedisResult<RV>

Get multiple random members from a set. Redis Docs
Source§

#### fn srem<'a, K: ToSingleRedisArg, M: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, member: M, ) -> RedisResult<RV>

Remove one or more members from a set. Redis Docs
Source§

#### fn sunion<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, keys: K, ) -> RedisResult<RV>

Add multiple sets. Redis Docs
Source§

#### fn sunionstore<'a, D: ToSingleRedisArg, K: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, keys: K, ) -> RedisResult<RV>

Add multiple sets and store the resulting set in a key. Redis Docs
Source§

#### fn zadd<'a, K: ToSingleRedisArg, S: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, member: M, score: S, ) -> RedisResult<RV>

Add one member to a sorted set, or update its score if it already exists. Redis Docs
Source§

#### fn zadd_multiple<'a, K: ToSingleRedisArg, S: ToRedisArgs, M: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, items: &'a [(S, M)], ) -> RedisResult<RV>

Add multiple members to a sorted set, or update its score if it already exists. Redis Docs
Source§

#### fn zadd_options<'a, K: ToSingleRedisArg, S: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, member: M, score: S, options: &'a SortedSetAddOptions, ) -> RedisResult<RV>

Add one member to a sorted set, or update its score if it already exists. Redis Docs
Source§

#### fn zadd_multiple_options<'a, K: ToSingleRedisArg, S: ToRedisArgs, M: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, items: &'a [(S, M)], options: &'a SortedSetAddOptions, ) -> RedisResult<RV>

Add multiple members to a sorted set, or update its score if it already exists. Redis Docs
Source§

#### fn zcard<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Get the number of members in a sorted set. Redis Docs
Source§

#### fn zcount<'a, K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, min: M, max: MM, ) -> RedisResult<RV>

Count the members in a sorted set with scores within the given values. Redis Docs
Source§

#### fn zincr<'a, K: ToSingleRedisArg, M: ToSingleRedisArg, D: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, member: M, delta: D, ) -> RedisResult<RV>

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. Redis Docs
Source§

#### fn zinterstore<'a, D: ToSingleRedisArg, K: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, keys: K, ) -> RedisResult<RV>

Intersect multiple sorted sets and store the resulting sorted set in a new key using SUM as aggregation function. Redis Docs
Source§

#### fn zinterstore_min<'a, D: ToSingleRedisArg, K: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, keys: K, ) -> RedisResult<RV>

Intersect multiple sorted sets and store the resulting sorted set in a new key using MIN as aggregation function. Redis Docs
Source§

#### fn zinterstore_max<'a, D: ToSingleRedisArg, K: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, keys: K, ) -> RedisResult<RV>

Intersect multiple sorted sets and store the resulting sorted set in a new key using MAX as aggregation function. Redis Docs
Source§

#### fn zinterstore_weights<'a, D: ToSingleRedisArg, K: ToRedisArgs, W: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, keys: &'a [(K, W)], ) -> RedisResult<RV>

`Commands::zinterstore`, but with the ability to specify a multiplication factor for each sorted set by pairing one with each key in a tuple. Redis Docs
Source§

#### fn zinterstore_min_weights<'a, D: ToSingleRedisArg, K: ToRedisArgs, W: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, keys: &'a [(K, W)], ) -> RedisResult<RV>

`Commands::zinterstore_min`, but with the ability to specify a multiplication factor for each sorted set by pairing one with each key in a tuple. Redis Docs
Source§

#### fn zinterstore_max_weights<'a, D: ToSingleRedisArg, K: ToRedisArgs, W: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, keys: &'a [(K, W)], ) -> RedisResult<RV>

`Commands::zinterstore_max`, but with the ability to specify a multiplication factor for each sorted set by pairing one with each key in a tuple. Redis Docs
Source§

#### fn zlexcount<'a, K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, min: M, max: MM, ) -> RedisResult<RV>

Count the number of members in a sorted set between a given lexicographical range. Redis Docs
Source§

#### fn bzpopmax<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, timeout: f64, ) -> RedisResult<RV>

Removes and returns the member with the highest score in a sorted set. Blocks until a member is available otherwise. Redis Docs
Source§

#### fn zpopmax<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, count: isize, ) -> RedisResult<RV>

Removes and returns up to count members with the highest scores in a sorted set Redis Docs
Source§

#### fn bzpopmin<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, timeout: f64, ) -> RedisResult<RV>

Removes and returns the member with the lowest score in a sorted set. Blocks until a member is available otherwise. Redis Docs
Source§

#### fn zpopmin<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, count: isize, ) -> RedisResult<RV>

Removes and returns up to count members with the lowest scores in a sorted set Redis Docs
Source§

#### fn bzmpop_max<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, timeout: f64, keys: K, count: isize, ) -> RedisResult<RV>

Removes and returns up to count members with the highest scores, from the first non-empty sorted set in the provided list of key names. Blocks until a member is available otherwise. Redis Docs
Source§

#### fn zmpop_max<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, keys: K, count: isize, ) -> RedisResult<RV>

Removes and returns up to count members with the highest scores, from the first non-empty sorted set in the provided list of key names. Redis Docs
Source§

#### fn bzmpop_min<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, timeout: f64, keys: K, count: isize, ) -> RedisResult<RV>

Removes and returns up to count members with the lowest scores, from the first non-empty sorted set in the provided list of key names. Blocks until a member is available otherwise. Redis Docs
Source§

#### fn zmpop_min<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, keys: K, count: isize, ) -> RedisResult<RV>

Removes and returns up to count members with the lowest scores, from the first non-empty sorted set in the provided list of key names. Redis Docs
Source§

#### fn zrandmember<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, count: Option<isize>, ) -> RedisResult<RV>

Return up to count random members in a sorted set (or 1 if `count == None`) Redis Docs
Source§

#### fn zrandmember_withscores<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, count: isize, ) -> RedisResult<RV>

Return up to count random members in a sorted set with scores Redis Docs
Source§

#### fn zrange<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, start: isize, stop: isize, ) -> RedisResult<RV>

Return a range of members in a sorted set, by index Redis Docs
Source§

#### fn zrange_withscores<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, start: isize, stop: isize, ) -> RedisResult<RV>

Return a range of members in a sorted set, by index with scores. Redis Docs
Source§

#### fn zrangebylex<'a, K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, min: M, max: MM, ) -> RedisResult<RV>

Return a range of members in a sorted set, by lexicographical range. Redis Docs
Source§

#### fn zrangebylex_limit<'a, K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, min: M, max: MM, offset: isize, count: isize, ) -> RedisResult<RV>

Return a range of members in a sorted set, by lexicographical range with offset and limit. Redis Docs
Source§

#### fn zrevrangebylex<'a, K: ToSingleRedisArg, MM: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, max: MM, min: M, ) -> RedisResult<RV>

Return a range of members in a sorted set, by lexicographical range. Redis Docs
Source§

#### fn zrevrangebylex_limit<'a, K: ToSingleRedisArg, MM: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, max: MM, min: M, offset: isize, count: isize, ) -> RedisResult<RV>

Return a range of members in a sorted set, by lexicographical range with offset and limit. Redis Docs
Source§

#### fn zrangebyscore<'a, K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, min: M, max: MM, ) -> RedisResult<RV>

Return a range of members in a sorted set, by score. Redis Docs
Source§

#### fn zrangebyscore_withscores<'a, K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, min: M, max: MM, ) -> RedisResult<RV>

Return a range of members in a sorted set, by score with scores. Redis Docs
Source§

#### fn zrangebyscore_limit<'a, K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, min: M, max: MM, offset: isize, count: isize, ) -> RedisResult<RV>

Return a range of members in a sorted set, by score with limit. Redis Docs
Source§

#### fn zrangebyscore_limit_withscores<'a, K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, min: M, max: MM, offset: isize, count: isize, ) -> RedisResult<RV>

Return a range of members in a sorted set, by score with limit with scores. Redis Docs
Source§

#### fn zrank<'a, K: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, member: M, ) -> RedisResult<RV>

Determine the index of a member in a sorted set. Redis Docs
Source§

#### fn zrem<'a, K: ToSingleRedisArg, M: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, members: M, ) -> RedisResult<RV>

Remove one or more members from a sorted set. Redis Docs
Source§

#### fn zrembylex<'a, K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, min: M, max: MM, ) -> RedisResult<RV>

Remove all members in a sorted set between the given lexicographical range. Redis Docs
Source§

#### fn zremrangebyrank<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, start: isize, stop: isize, ) -> RedisResult<RV>

Remove all members in a sorted set within the given indexes. Redis Docs
Source§

#### fn zrembyscore<'a, K: ToSingleRedisArg, M: ToSingleRedisArg, MM: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, min: M, max: MM, ) -> RedisResult<RV>

Remove all members in a sorted set within the given scores. Redis Docs
Source§

#### fn zrevrange<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, start: isize, stop: isize, ) -> RedisResult<RV>

Return a range of members in a sorted set, by index, ordered from high to low. Redis Docs
Source§

#### fn zrevrange_withscores<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, start: isize, stop: isize, ) -> RedisResult<RV>

Return a range of members in a sorted set, by index, with scores ordered from high to low. Redis Docs
Source§

#### fn zrevrangebyscore<'a, K: ToSingleRedisArg, MM: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, max: MM, min: M, ) -> RedisResult<RV>

Return a range of members in a sorted set, by score. Redis Docs
Source§

#### fn zrevrangebyscore_withscores<'a, K: ToSingleRedisArg, MM: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, max: MM, min: M, ) -> RedisResult<RV>

Return a range of members in a sorted set, by score with scores. Redis Docs
Source§

#### fn zrevrangebyscore_limit<'a, K: ToSingleRedisArg, MM: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, max: MM, min: M, offset: isize, count: isize, ) -> RedisResult<RV>

Return a range of members in a sorted set, by score with limit. Redis Docs
Source§

#### fn zrevrangebyscore_limit_withscores<'a, K: ToSingleRedisArg, MM: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, max: MM, min: M, offset: isize, count: isize, ) -> RedisResult<RV>

Return a range of members in a sorted set, by score with limit with scores. Redis Docs
Source§

#### fn zrevrank<'a, K: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, member: M, ) -> RedisResult<RV>

Determine the index of a member in a sorted set, with scores ordered from high to low. Redis Docs
Source§

#### fn zscore<'a, K: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, member: M, ) -> RedisResult<RV>

Get the score associated with the given member in a sorted set. Redis Docs
Source§

#### fn zscore_multiple<'a, K: ToSingleRedisArg, M: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, members: &'a [M], ) -> RedisResult<RV>

Get the scores associated with multiple members in a sorted set. Redis Docs
Source§

#### fn zunionstore<'a, D: ToSingleRedisArg, K: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, keys: K, ) -> RedisResult<RV>

Unions multiple sorted sets and store the resulting sorted set in a new key using SUM as aggregation function. Redis Docs
Source§

#### fn zunionstore_min<'a, D: ToSingleRedisArg, K: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, keys: K, ) -> RedisResult<RV>

Unions multiple sorted sets and store the resulting sorted set in a new key using MIN as aggregation function. Redis Docs
Source§

#### fn zunionstore_max<'a, D: ToSingleRedisArg, K: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, keys: K, ) -> RedisResult<RV>

Unions multiple sorted sets and store the resulting sorted set in a new key using MAX as aggregation function. Redis Docs
Source§

#### fn zunionstore_weights<'a, D: ToSingleRedisArg, K: ToRedisArgs, W: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, keys: &'a [(K, W)], ) -> RedisResult<RV>

`Commands::zunionstore`, but with the ability to specify a multiplication factor for each sorted set by pairing one with each key in a tuple. Redis Docs
Source§

#### fn zunionstore_min_weights<'a, D: ToSingleRedisArg, K: ToRedisArgs, W: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, keys: &'a [(K, W)], ) -> RedisResult<RV>

`Commands::zunionstore_min`, but with the ability to specify a multiplication factor for each sorted set by pairing one with each key in a tuple. Redis Docs
Source§

#### fn zunionstore_max_weights<'a, D: ToSingleRedisArg, K: ToRedisArgs, W: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, keys: &'a [(K, W)], ) -> RedisResult<RV>

`Commands::zunionstore_max`, but with the ability to specify a multiplication factor for each sorted set by pairing one with each key in a tuple. Redis Docs
Source§

#### fn vadd<'a, K: ToRedisArgs, E: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, input: VectorAddInput<'a>, element: E, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Add a new element into the vector set specified by key. Redis Docs
Source§

#### fn vadd_options<'a, K: ToRedisArgs, E: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, input: VectorAddInput<'a>, element: E, options: &'a VAddOptions, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Add a new element into the vector set specified by key with optional parameters for fine-tuning the insertion process. Redis Docs
Source§

#### fn vcard<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Get the number of members in a vector set. Redis Docs
Source§

#### fn vdim<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Return the number of dimensions of the vectors in the specified vector set. Redis Docs
Source§

#### fn vemb<'a, K: ToRedisArgs, E: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, element: E, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Return the approximate vector associated with a given element in the vector set. Redis Docs
Source§

#### fn vemb_options<'a, K: ToRedisArgs, E: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, element: E, options: &'a VEmbOptions, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Return the raw internal representation of the approximate vector associated with a given element in the vector set. Vector sets normalize and may quantize vectors on insertion. VEMB reverses this process to approximate the original vector by de-normalizing and de-quantizing it. Redis Docs
Source§

#### fn vrem<'a, K: ToRedisArgs, E: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, element: E, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Remove an element from a vector set. Redis Docs
Source§

#### fn vsetattr<'a, K: ToRedisArgs, E: ToRedisArgs, J: Serialize, RV: FromRedisValue>( &mut self, key: K, element: E, json_object: &'a J, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Associate a JSON object with an element in a vector set. Use this command to store attributes that can be used in filtered similarity searches with VSIM. Redis Docs
Source§

#### fn vdelattr<'a, K: ToRedisArgs, E: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, element: E, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Delete the JSON attributes associated with an element in a vector set. This is an utility function that uses VSETATTR with an empty string. Redis Docs
Source§

#### fn vgetattr<'a, K: ToRedisArgs, E: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, element: E, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Return the JSON attributes associated with an element in a vector set. Redis Docs
Source§

#### fn vinfo<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Return metadata and internal details about a vector set, including size, dimensions, quantization type, and graph structure. Redis Docs
Source§

#### fn vlinks<'a, K: ToRedisArgs, E: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, element: E, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Return the neighbors of a specified element in a vector set. The command shows the connections for each layer of the HNSW graph. Redis Docs
Source§

#### fn vlinks_with_scores<'a, K: ToRedisArgs, E: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, element: E, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Return the neighbors of a specified element in a vector set. The command shows the connections for each layer of the HNSW graph and includes similarity scores for each neighbor. Redis Docs]
Source§

#### fn vrandmember<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Return one random elements from a vector set. Redis Docs
Source§

#### fn vrandmember_multiple<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, count: usize, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Return multiple random elements from a vector set. Redis Docs
Source§

#### fn vsim<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, input: VectorSimilaritySearchInput<'a>, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Perform vector similarity search. Redis Docs
Source§

#### fn vsim_options<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, input: VectorSimilaritySearchInput<'a>, options: &'a VSimOptions, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Performs a vector similarity search with optional parameters for customization. Redis Docs
Source§

#### fn pfadd<'a, K: ToSingleRedisArg, E: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, element: E, ) -> RedisResult<RV>

Adds the specified elements to the specified HyperLogLog. Redis Docs
Source§

#### fn pfcount<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s). Redis Docs
Source§

#### fn pfmerge<'a, D: ToSingleRedisArg, S: ToRedisArgs, RV: FromRedisValue>( &mut self, dstkey: D, srckeys: S, ) -> RedisResult<RV>

Merge N different HyperLogLogs into a single one. Redis Docs
Source§

#### fn publish<'a, K: ToSingleRedisArg, E: ToSingleRedisArg, RV: FromRedisValue>( &mut self, channel: K, message: E, ) -> RedisResult<RV>

Posts a message to the given channel. Redis Docs
Source§

#### fn spublish<'a, K: ToSingleRedisArg, E: ToSingleRedisArg, RV: FromRedisValue>( &mut self, channel: K, message: E, ) -> RedisResult<RV>

Posts a message to the given sharded channel. Redis Docs
Source§

#### fn object_encoding<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Returns the encoding of a key. Redis Docs
Source§

#### fn object_idletime<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Returns the time in seconds since the last access of a key. Redis Docs
Source§

#### fn object_freq<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Returns the logarithmic access frequency counter of a key. Redis Docs
Source§

#### fn object_refcount<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Returns the reference count of a key. Redis Docs
Source§

#### fn client_getname<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV>

Returns the name of the current connection as set by CLIENT SETNAME. Redis Docs
Source§

#### fn client_id<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV>

Returns the ID of the current connection. Redis Docs
Source§

#### fn client_setname<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, connection_name: K, ) -> RedisResult<RV>

Command assigns a name to the current connection. Redis Docs
Source§

#### fn acl_load<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV>

Available on crate feature `acl` only.
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. Redis Docs
Source§

#### fn acl_save<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV>

Available on crate feature `acl` only.
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. Redis Docs
Source§

#### fn acl_list<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV>

Available on crate feature `acl` only.
Shows the currently active ACL rules in the Redis server. Redis Docs
Source§

#### fn acl_users<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV>

Available on crate feature `acl` only.
Shows a list of all the usernames of the currently configured users in the Redis ACL system. Redis Docs
Source§

#### fn acl_getuser<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, username: K, ) -> RedisResult<RV>

Available on crate feature `acl` only.
Returns all the rules defined for an existing ACL user. Redis Docs
Source§

#### fn acl_setuser<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, username: K, ) -> RedisResult<RV>

Available on crate feature `acl` only.
Creates an ACL user without any privilege. Redis Docs
Source§

#### fn acl_setuser_rules<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, username: K, rules: &'a [Rule], ) -> RedisResult<RV>

Available on crate feature `acl` only.
Creates an ACL user with the specified rules or modify the rules of an existing user. Redis Docs
Source§

#### fn acl_deluser<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, usernames: &'a [K], ) -> RedisResult<RV>

Available on crate feature `acl` only.
Delete all the specified ACL users and terminate all the connections that are authenticated with such users. Redis Docs
Source§

#### fn acl_dryrun<'a, K: ToSingleRedisArg, C: ToSingleRedisArg, A: ToRedisArgs, RV: FromRedisValue>( &mut self, username: K, command: C, args: A, ) -> RedisResult<RV>

Available on crate feature `acl` only.
Simulate the execution of a given command by a given user. Redis Docs
Source§

#### fn acl_cat<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV>

Available on crate feature `acl` only.
Shows the available ACL categories. Redis Docs
Source§

#### fn acl_cat_categoryname<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, categoryname: K, ) -> RedisResult<RV>

Available on crate feature `acl` only.
Shows all the Redis commands in the specified category. Redis Docs
Source§

#### fn acl_genpass<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV>

Available on crate feature `acl` only.
Generates a 256-bits password starting from /dev/urandom if available. Redis Docs
Source§

#### fn acl_genpass_bits<'a, RV: FromRedisValue>( &mut self, bits: isize, ) -> RedisResult<RV>

Available on crate feature `acl` only.
Generates a 1-to-1024-bits password starting from /dev/urandom if available. Redis Docs
Source§

#### fn acl_whoami<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV>

Available on crate feature `acl` only.
Returns the username the current connection is authenticated with. Redis Docs
Source§

#### fn acl_log<'a, RV: FromRedisValue>(&mut self, count: isize) -> RedisResult<RV>

Available on crate feature `acl` only.
Shows a list of recent ACL security events Redis Docs
Source§

#### fn acl_log_reset<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV>

Available on crate feature `acl` only.
Clears the ACL log. Redis Docs
Source§

#### fn acl_help<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV>

Available on crate feature `acl` only.
Returns a helpful text describing the different subcommands. Redis Docs
Source§

#### fn geo_add<'a, K: ToSingleRedisArg, M: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, members: M, ) -> RedisResult<RV>

Available on crate feature `geospatial` only.
Adds the specified geospatial items to the specified key. Read more
Source§

#### fn geo_dist<'a, K: ToSingleRedisArg, M1: ToSingleRedisArg, M2: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, member1: M1, member2: M2, unit: Unit, ) -> RedisResult<RV>

Available on crate feature `geospatial` only.
Return the distance between two members in the geospatial index represented by the sorted set. Read more
Source§

#### fn geo_hash<'a, K: ToSingleRedisArg, M: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, members: M, ) -> RedisResult<RV>

Available on crate feature `geospatial` only.
Return valid Geohash strings representing the position of one or more members of the geospatial index represented by the sorted set at key. Read more
Source§

#### fn geo_pos<'a, K: ToSingleRedisArg, M: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, members: M, ) -> RedisResult<RV>

Available on crate feature `geospatial` only.
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<'a, K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, longitude: f64, latitude: f64, radius: f64, unit: Unit, options: RadiusOptions, ) -> RedisResult<RV>

Available on crate feature `geospatial` only.
Return the members of a sorted set populated with geospatial information using `geo_add`, which are within the borders of the area specified with the center location and the maximum distance from the center (the radius). Read more
Source§

#### fn geo_radius_by_member<'a, K: ToSingleRedisArg, M: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, member: M, radius: f64, unit: Unit, options: RadiusOptions, ) -> RedisResult<RV>

Available on crate feature `geospatial` only.
Retrieve members selected by distance with the center of `member`. The member itself is always contained in the results. Redis Docs
Source§

#### fn xack<'a, K: ToRedisArgs, G: ToRedisArgs, I: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, group: G, ids: &'a [I], ) -> RedisResult<RV>

Available on crate feature `streams` only.
Ack pending stream messages checked out by a consumer. Read more
Source§

#### fn xadd<'a, K: ToRedisArgs, ID: ToRedisArgs, F: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, id: ID, items: &'a [(F, V)], ) -> RedisResult<RV>

Available on crate feature `streams` only.
Add a stream message by `key`. Use `*` as the `id` for the current timestamp. Read more
Source§

#### fn xadd_map<'a, K: ToRedisArgs, ID: ToRedisArgs, BTM: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, id: ID, map: BTM, ) -> RedisResult<RV>

Available on crate feature `streams` only.
BTreeMap variant for adding a stream message by `key`. Use `*` as the `id` for the current timestamp. Read more
Source§

#### fn xadd_options<'a, K: ToRedisArgs, ID: ToRedisArgs, I: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, id: ID, items: I, options: &'a StreamAddOptions, ) -> RedisResult<RV>

Available on crate feature `streams` only.
Add a stream message with options. Read more
Source§

#### fn xadd_maxlen<'a, K: ToSingleRedisArg, ID: ToRedisArgs, F: ToRedisArgs, V: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, maxlen: StreamMaxlen, id: ID, items: &'a [(F, V)], ) -> RedisResult<RV>

Available on crate feature `streams` only.
Add a stream message while capping the stream at a maxlength. Read more
Source§

#### fn xadd_maxlen_map<'a, K: ToSingleRedisArg, ID: ToRedisArgs, BTM: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, maxlen: StreamMaxlen, id: ID, map: BTM, ) -> RedisResult<RV>

Available on crate feature `streams` only.
BTreeMap variant for adding a stream message while capping the stream at a maxlength. Read more
Source§

#### fn xautoclaim_options<'a, K: ToSingleRedisArg, G: ToRedisArgs, C: ToRedisArgs, MIT: ToRedisArgs, S: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, group: G, consumer: C, min_idle_time: MIT, start: S, options: StreamAutoClaimOptions, ) -> RedisResult<RV>

Available on crate feature `streams` only.
Perform a combined xpending and xclaim flow. Read more
Source§

#### fn xclaim<'a, K: ToSingleRedisArg, G: ToRedisArgs, C: ToRedisArgs, MIT: ToRedisArgs, ID: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, group: G, consumer: C, min_idle_time: MIT, ids: &'a [ID], ) -> RedisResult<RV>

Available on crate feature `streams` only.
Claim pending, unacked messages, after some period of time, currently checked out by another consumer. Read more
Source§

#### fn xclaim_options<'a, K: ToSingleRedisArg, G: ToRedisArgs, C: ToRedisArgs, MIT: ToRedisArgs, ID: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, group: G, consumer: C, min_idle_time: MIT, ids: &'a [ID], options: StreamClaimOptions, ) -> RedisResult<RV>

Available on crate feature `streams` only.
This is the optional arguments version for claiming unacked, pending messages currently checked out by another consumer. Read more
Source§

#### fn xdel<'a, K: ToSingleRedisArg, ID: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, ids: &'a [ID], ) -> RedisResult<RV>

Available on crate feature `streams` only.
Deletes a list of `id`s for a given stream `key`. Read more
Source§

#### fn xdel_ex<'a, K: ToRedisArgs, ID: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, ids: &'a [ID], options: StreamDeletionPolicy, ) -> RedisResult<RV>

Available on crate feature `streams` only.
An extension of the Streams `XDEL` command that provides finer control over how message entries are deleted with respect to consumer groups.
Source§

#### fn xack_del<'a, K: ToRedisArgs, G: ToRedisArgs, ID: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, group: G, ids: &'a [ID], options: StreamDeletionPolicy, ) -> RedisResult<RV>

Available on crate feature `streams` only.
A combination of `XACK` and `XDEL` that acknowledges and attempts to delete a list of `ids` for a given stream `key` and consumer `group`.
Source§

#### fn xgroup_create<'a, K: ToRedisArgs, G: ToRedisArgs, ID: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, group: G, id: ID, ) -> RedisResult<RV>

Available on crate feature `streams` only.
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
Source§

#### fn xgroup_createconsumer<'a, K: ToRedisArgs, G: ToRedisArgs, C: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, group: G, consumer: C, ) -> RedisResult<RV>

Available on crate feature `streams` only.
This creates a `consumer` explicitly (vs implicit via XREADGROUP) for given stream `key. Read more
Source§

#### fn xgroup_create_mkstream<'a, K: ToRedisArgs, G: ToRedisArgs, ID: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, group: G, id: ID, ) -> RedisResult<RV>

Available on crate feature `streams` only.
This is the alternate version for creating a consumer `group` which makes the stream if it doesn’t exist. Read more
Source§

#### fn xgroup_setid<'a, K: ToRedisArgs, G: ToRedisArgs, ID: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, group: G, id: ID, ) -> RedisResult<RV>

Available on crate feature `streams` only.
Alter which `id` you want consumers to begin reading from an existing consumer `group`. Read more
Source§

#### fn xgroup_destroy<'a, K: ToRedisArgs, G: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, group: G, ) -> RedisResult<RV>

Available on crate feature `streams` only.
Destroy an existing consumer `group` for a given stream `key` Read more
Source§

#### fn xgroup_delconsumer<'a, K: ToRedisArgs, G: ToRedisArgs, C: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, group: G, consumer: C, ) -> RedisResult<RV>

Available on crate feature `streams` only.
This deletes a `consumer` from an existing consumer `group` for given stream `key. Read more
Source§

#### fn xinfo_consumers<'a, K: ToRedisArgs, G: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, group: G, ) -> RedisResult<RV>

Available on crate feature `streams` only.
This returns all info details about which consumers have read messages for given consumer `group`. Take note of the StreamInfoConsumersReply return type. Read more
Source§

#### fn xinfo_groups<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Available on crate feature `streams` only.
Returns all consumer `group`s created for a given stream `key`. Take note of the StreamInfoGroupsReply return type. Read more
Source§

#### fn xinfo_stream<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Available on crate feature `streams` only.
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
Source§

#### fn xlen<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Available on crate feature `streams` only.
Returns the number of messages for a given stream `key`. Read more
Source§

#### fn xpending<'a, K: ToRedisArgs, G: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, group: G, ) -> RedisResult<RV>

Available on crate feature `streams` only.
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
Source§

#### fn xpending_count<'a, K: ToRedisArgs, G: ToRedisArgs, S: ToRedisArgs, E: ToRedisArgs, C: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, group: G, start: S, end: E, count: C, ) -> RedisResult<RV>

Available on crate feature `streams` only.
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<'a, K: ToRedisArgs, G: ToRedisArgs, S: ToRedisArgs, E: ToRedisArgs, C: ToRedisArgs, CN: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, group: G, start: S, end: E, count: C, consumer: CN, ) -> RedisResult<RV>

Available on crate feature `streams` only.
An alternate version of `xpending_count` which filters by `consumer` name. Read more
Source§

#### fn xrange<'a, K: ToRedisArgs, S: ToRedisArgs, E: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, start: S, end: E, ) -> RedisResult<RV>

Available on crate feature `streams` only.
Returns a range of messages in a given stream `key`. Read more
Source§

#### fn xrange_all<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Available on crate feature `streams` only.
A helper method for automatically returning all messages in a stream by `key`. Use with caution! Read more
Source§

#### fn xrange_count<'a, K: ToRedisArgs, S: ToRedisArgs, E: ToRedisArgs, C: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, start: S, end: E, count: C, ) -> RedisResult<RV>

Available on crate feature `streams` only.
A method for paginating a stream by `key`. Read more
Source§

#### fn xread<'a, K: ToRedisArgs, ID: ToRedisArgs, RV: FromRedisValue>( &mut self, keys: &'a [K], ids: &'a [ID], ) -> RedisResult<RV>

Available on crate feature `streams` only.
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 more
Source§

#### fn xread_options<'a, K: ToRedisArgs, ID: ToRedisArgs, RV: FromRedisValue>( &mut self, keys: &'a [K], ids: &'a [ID], options: &'a StreamReadOptions, ) -> RedisResult<RV>

Available on crate feature `streams` only.
This method handles setting optional arguments for `XREAD` or `XREADGROUP` Redis commands. Read more
Source§

#### fn xrevrange<'a, K: ToRedisArgs, E: ToRedisArgs, S: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, end: E, start: S, ) -> RedisResult<RV>

Available on crate feature `streams` only.
This is the reverse version of `xrange`. The same rules apply for `start` and `end` here. Read more
Source§

#### fn xrevrange_all<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<RV>

Available on crate feature `streams` only.
This is the reverse version of `xrange_all`. The same rules apply for `start` and `end` here. Read more
Source§

#### fn xrevrange_count<'a, K: ToRedisArgs, E: ToRedisArgs, S: ToRedisArgs, C: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, end: E, start: S, count: C, ) -> RedisResult<RV>

Available on crate feature `streams` only.
This is the reverse version of `xrange_count`. The same rules apply for `start` and `end` here. Read more
Source§

#### fn xtrim<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, maxlen: StreamMaxlen, ) -> RedisResult<RV>

Available on crate feature `streams` only.
Trim a stream `key` to a MAXLEN count. Read more
Source§

#### fn xtrim_options<'a, K: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, options: &'a StreamTrimOptions, ) -> RedisResult<RV>

Available on crate feature `streams` only.
Trim a stream `key` with full options Read more
Source§

#### fn load_script<'a, RV: FromRedisValue>( &mut self, script: &'a Script, ) -> RedisResult<RV>

Available on crate feature `script` only.
Load a script. Read more
Source§

#### fn invoke_script<'a, RV: FromRedisValue>( &mut self, invocation: &'a ScriptInvocation<'a>, ) -> RedisResult<RV>

Available on crate feature `script` only.
Invoke a prepared script. Read more
Source§

#### fn flushall<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV>

Deletes all the keys of all databases Read more
Source§

#### fn flushall_options<'a, RV: FromRedisValue>( &mut self, options: &'a FlushAllOptions, ) -> RedisResult<RV>

Deletes all the keys of all databases with options Read more
Source§

#### fn flushdb<'a, RV: FromRedisValue>(&mut self) -> RedisResult<RV>

Deletes all the keys of the current database Read more
Source§

#### fn flushdb_options<'a, RV: FromRedisValue>( &mut self, options: &'a FlushDbOptions, ) -> RedisResult<RV>

Deletes all the keys of the current database with options Read more
Source§

#### fn scan<RV: FromRedisValue>(&mut self) -> RedisResult<Iter<'_, RV>>

Incrementally iterate the keys space.
Source§

#### fn scan_options<RV: FromRedisValue>( &mut self, opts: ScanOptions, ) -> RedisResult<Iter<'_, RV>>

Incrementally iterate the keys space with options.
Source§

#### fn scan_match<P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, pattern: P, ) -> RedisResult<Iter<'_, RV>>

Incrementally iterate the keys space for keys matching a pattern.
Source§

#### fn hscan<K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<Iter<'_, RV>>

Incrementally iterate hash fields and associated values.
Source§

#### fn hscan_match<K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, pattern: P, ) -> RedisResult<Iter<'_, RV>>

Incrementally iterate hash fields and associated values for field names matching a pattern.
Source§

#### fn sscan<K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<Iter<'_, RV>>

Incrementally iterate set elements.
Source§

#### fn sscan_match<K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, pattern: P, ) -> RedisResult<Iter<'_, RV>>

Incrementally iterate set elements for elements matching a pattern.
Source§

#### fn zscan<K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<Iter<'_, RV>>

Incrementally iterate sorted set elements.
Source§

#### fn zscan_match<K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, pattern: P, ) -> RedisResult<Iter<'_, RV>>

Incrementally iterate sorted set elements for elements matching a pattern.
Source§

### impl<T> From<T> for T

Source§

#### fn from(t: T) -> T

Returns the argument unchanged.

§

### impl<T> Instrument for T

§

#### fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [`Span`], returning an `Instrumented` wrapper. Read more
§

#### fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current `Span`, returning an `Instrumented` wrapper. Read more
Source§

### impl<T, U> Into<U> for T
where U: From<T>,

Source§

#### fn into(self) -> U

Calls `U::from(self)`.

That is, this conversion is whatever the implementation of `From<T> for U` chooses to do.

Source§

### impl<T> JsonCommands for T
where T: ConnectionLike,

Source§

#### fn json_arr_append<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, V: Serialize, RV: FromRedisValue>( &mut self, key: K, path: P, value: &'a V, ) -> RedisResult<RV>

Available on crate feature `json` only.
Append the JSON `value` to the array at `path` after the last element in it.
Source§

#### fn json_arr_index<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, V: Serialize, RV: FromRedisValue>( &mut self, key: K, path: P, value: &'a V, ) -> RedisResult<RV>

Available on crate feature `json` only.
Index array at `path`, returns first occurrence of `value`
Source§

#### fn json_arr_index_ss<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, V: Serialize, RV: FromRedisValue>( &mut self, key: K, path: P, value: &'a V, start: &'a isize, stop: &'a isize, ) -> RedisResult<RV>

Available on crate feature `json` only.
Same as `json_arr_index` except takes a `start` and a `stop` value, setting these to `0` will mean they make no effect on the query Read more
Source§

#### fn json_arr_insert<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, V: Serialize, RV: FromRedisValue>( &mut self, key: K, path: P, index: i64, value: &'a V, ) -> RedisResult<RV>

Available on crate feature `json` only.
Inserts the JSON `value` in the array at `path` before the `index` (shifts to the right). Read more
Source§

#### fn json_arr_len<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, path: P, ) -> RedisResult<RV>

Available on crate feature `json` only.
Reports the length of the JSON Array at `path` in `key`.
Source§

#### fn json_arr_pop<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, path: P, index: i64, ) -> RedisResult<RV>

Available on crate feature `json` only.
Removes and returns an element from the `index` in the array. Read more
Source§

#### fn json_arr_trim<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, path: P, start: i64, stop: i64, ) -> RedisResult<RV>

Available on crate feature `json` only.
Trims an array so that it contains only the specified inclusive range of elements. Read more
Source§

#### fn json_clear<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, path: P, ) -> RedisResult<RV>

Available on crate feature `json` only.
Clears container values (Arrays/Objects), and sets numeric values to 0.
Source§

#### fn json_del<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, path: P, ) -> RedisResult<RV>

Available on crate feature `json` only.
Deletes a value at `path`.
Source§

#### fn json_get<'a, K: ToSingleRedisArg, P: ToRedisArgs, RV: FromRedisValue>( &mut self, key: K, path: P, ) -> RedisResult<RV>

Available on crate feature `json` only.
Gets JSON Value at `path`. Read more
Source§

#### fn json_mget<'a, K: ToRedisArgs, P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, path: P, ) -> RedisResult<RV>

Available on crate feature `json` only.
Gets JSON Values at `path`. Read more
Source§

#### fn json_num_incr_by<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, path: P, value: i64, ) -> RedisResult<RV>

Available on crate feature `json` only.
Increments the number value stored at `path` by `number`.
Source§

#### fn json_obj_keys<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, path: P, ) -> RedisResult<RV>

Available on crate feature `json` only.
Returns the keys in the object that’s referenced by `path`.
Source§

#### fn json_obj_len<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, path: P, ) -> RedisResult<RV>

Available on crate feature `json` only.
Reports the number of keys in the JSON Object at `path` in `key`.
Source§

#### fn json_set<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, V: Serialize, RV: FromRedisValue>( &mut self, key: K, path: P, value: &'a V, ) -> RedisResult<RV>

Available on crate feature `json` only.
Sets the JSON Value at `path` in `key`.
Source§

#### fn json_mset<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, V: Serialize, RV: FromRedisValue>( &mut self, key_path_values: &'a [(K, P, V)], ) -> RedisResult<RV>

Available on crate feature `json` only.
Sets the value at the path per key, for every given tuple.
Source§

#### fn json_str_append<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, V: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, path: P, value: V, ) -> RedisResult<RV>

Available on crate feature `json` only.
Appends the `json-string` values to the string at `path`.
Source§

#### fn json_str_len<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, path: P, ) -> RedisResult<RV>

Available on crate feature `json` only.
Reports the length of the JSON String at `path` in `key`.
Source§

#### fn json_toggle<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, path: P, ) -> RedisResult<RV>

Available on crate feature `json` only.
Toggle a `boolean` value stored at `path`.
Source§

#### fn json_type<'a, K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, path: P, ) -> RedisResult<RV>

Available on crate feature `json` only.
Reports the type of JSON value at `path`.
§

### impl<T> PolicyExt for T
where T: ?Sized,

§

#### fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new `Policy` that returns [`Action::Follow`] only if `self` and `other` return `Action::Follow`. Read more
§

#### fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new `Policy` that returns [`Action::Follow`] if either `self` or `other` returns `Action::Follow`. Read more
Source§

### impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

#### type Error = Infallible

The type returned in the event of a conversion error.
Source§

#### fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

### impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

#### type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

#### fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

### impl<T> TypedCommands for T
where T: ConnectionLike,

Source§

#### fn get<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<Option<String>>

Get the value of a key. If key is a vec this becomes an `MGET` (if using `TypedCommands`, you should specifically use `mget` to get the correct return type. Redis Docs
Source§

#### fn mget<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<Vec<Option<String>>>

Get values of keys Redis Docs
Source§

#### fn keys<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<Vec<String>>

Gets all keys matching pattern Redis Docs
Source§

#### fn set<'a, K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, value: V, ) -> RedisResult<()>

Set the string value of a key. Redis Docs
Source§

#### fn set_options<'a, K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, value: V, options: SetOptions, ) -> RedisResult<Option<String>>

Set the string value of a key with options. Redis Docs
Source§

#### fn mset<'a, K: ToRedisArgs + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a>( &'a mut self, items: &'a [(K, V)], ) -> RedisResult<()>

Sets multiple keys to their values. Redis Docs
Source§

#### fn set_ex<'a, K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, value: V, seconds: u64, ) -> RedisResult<()>

Set the value and expiration of a key. Redis Docs
Source§

#### fn pset_ex<'a, K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, value: V, milliseconds: u64, ) -> RedisResult<()>

Set the value and expiration in milliseconds of a key. Redis Docs
Source§

#### fn set_nx<'a, K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, value: V, ) -> RedisResult<bool>

Set the value of a key, only if the key does not exist Redis Docs
Source§

#### fn mset_nx<'a, K: ToRedisArgs + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a>( &'a mut self, items: &'a [(K, V)], ) -> RedisResult<bool>

Sets multiple keys to their values failing if at least one already exists. Redis Docs
Source§

#### fn mset_ex<'a, K: ToRedisArgs + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a>( &'a mut self, items: &'a [(K, V)], options: MSetOptions, ) -> RedisResult<bool>

Sets the given keys to their respective values. This command is an extension of the MSETNX that adds expiration and XX options. Redis Docs
Source§

#### fn getset<'a, K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, value: V, ) -> RedisResult<Option<String>>

Set the string value of a key and return its old value. Redis Docs
Source§

#### fn getrange<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, from: isize, to: isize, ) -> RedisResult<String>

Get a range of bytes/substring from the value of a key. Negative values provide an offset from the end of the value. Redis returns an empty string if the key doesn’t exist, not Nil Redis Docs
Source§

#### fn setrange<'a, K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, offset: isize, value: V, ) -> RedisResult<usize>

Overwrite the part of the value stored in key at the specified offset. Redis Docs
Source§

#### fn del<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<usize>

Delete one or more keys. Returns the number of keys deleted. Redis Docs
Source§

#### fn del_ex<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, value_comparison: ValueComparison, ) -> RedisResult<usize>

Conditionally removes the specified key. A key is ignored if it does not exist. IFEQ `match-value` - Delete the key only if its value is equal to `match-value` IFNE `match-value` - Delete the key only if its value is not equal to `match-value` IFDEQ `match-digest` - Delete the key only if the digest of its value is equal to `match-digest` IFDNE `match-digest` - Delete the key only if the digest of its value is not equal to `match-digest` Redis Docs
Source§

#### fn digest<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<Option<String>>

Get the hex signature of the value stored in the specified key. For the digest, Redis will use XXH3 Redis Docs
Source§

#### fn exists<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<bool>

Determine if a key exists. Redis Docs
Source§

#### fn key_type<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<ValueType>

Determine the type of key. Redis Docs
Source§

#### fn expire<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, seconds: i64, ) -> RedisResult<bool>

Set a key’s time to live in seconds. Returns whether expiration was set. Redis Docs
Source§

#### fn expire_at<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ts: i64, ) -> RedisResult<bool>

Set the expiration for a key as a UNIX timestamp. Returns whether expiration was set. Redis Docs
Source§

#### fn pexpire<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ms: i64, ) -> RedisResult<bool>

Set a key’s time to live in milliseconds. Returns whether expiration was set. Redis Docs
Source§

#### fn pexpire_at<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ts: i64, ) -> RedisResult<bool>

Set the expiration for a key as a UNIX timestamp in milliseconds. Returns whether expiration was set. Redis Docs
Source§

#### fn expire_time<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<IntegerReplyOrNoOp>

Get the absolute Unix expiration timestamp in seconds. Returns `ExistsButNotRelevant` if key exists but has no expiration time. Redis Docs
Source§

#### fn pexpire_time<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<IntegerReplyOrNoOp>

Get the absolute Unix expiration timestamp in milliseconds. Returns `ExistsButNotRelevant` if key exists but has no expiration time. Redis Docs
Source§

#### fn persist<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<bool>

Remove the expiration from a key. Returns whether a timeout was removed. Redis Docs
Source§

#### fn ttl<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<IntegerReplyOrNoOp>

Get the time to live for a key in seconds. Returns `ExistsButNotRelevant` if key exists but has no expiration time. Redis Docs
Source§

#### fn pttl<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<IntegerReplyOrNoOp>

Get the time to live for a key in milliseconds. Returns `ExistsButNotRelevant` if key exists but has no expiration time. Redis Docs
Source§

#### fn get_ex<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, expire_at: Expiry, ) -> RedisResult<Option<String>>

Get the value of a key and set expiration Redis Docs
Source§

#### fn get_del<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<Option<String>>

Get the value of a key and delete it Redis Docs
Source§

#### fn copy<'a, KSrc: ToSingleRedisArg + Send + Sync + 'a, KDst: ToSingleRedisArg + Send + Sync + 'a, Db: ToString + Send + Sync + 'a>( &'a mut self, source: KSrc, destination: KDst, options: CopyOptions<Db>, ) -> RedisResult<bool>

Copy the value from one key to another, returning whether the copy was successful. Redis Docs
Source§

#### fn rename<'a, K: ToSingleRedisArg + Send + Sync + 'a, N: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, new_key: N, ) -> RedisResult<()>

Rename a key. Errors if key does not exist. Redis Docs
Source§

#### fn rename_nx<'a, K: ToSingleRedisArg + Send + Sync + 'a, N: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, new_key: N, ) -> RedisResult<bool>

Rename a key, only if the new key does not exist. Errors if key does not exist. Returns whether the key was renamed, or false if the new key already exists. Redis Docs
Source§

#### fn unlink<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<usize>

Unlink one or more keys. This is a non-blocking version of `DEL`. Returns number of keys unlinked. Redis Docs
Source§

#### fn append<'a, K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, value: V, ) -> RedisResult<usize>

Append a value to a key. Returns length of string after operation. Redis Docs
Source§

#### fn incr<'a, K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, delta: V, ) -> RedisResult<isize>

Increment the numeric value of a key by the given amount. This issues a `INCRBY` or `INCRBYFLOAT` depending on the type. If the key does not exist, it is set to 0 before performing the operation.
Source§

#### fn decr<'a, K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, delta: V, ) -> RedisResult<isize>

Decrement the numeric value of a key by the given amount. If the key does not exist, it is set to 0 before performing the operation. Redis Docs
Source§

#### fn setbit<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, offset: usize, value: bool, ) -> RedisResult<bool>

Sets or clears the bit at offset in the string value stored at key. Returns the original bit value stored at offset. Redis Docs
Source§

#### fn getbit<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, offset: usize, ) -> RedisResult<bool>

Returns the bit value at offset in the string value stored at key. Redis Docs
Source§

#### fn bitcount<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<usize>

Count set bits in a string. Returns 0 if key does not exist. Redis Docs
Source§

#### fn bitcount_range<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, start: usize, end: usize, ) -> RedisResult<usize>

Count set bits in a string in a range. Returns 0 if key does not exist. Redis Docs
Source§

#### fn bit_and<'a, D: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, srckeys: S, ) -> RedisResult<usize>

Perform a bitwise AND between multiple keys (containing string values) and store the result in the destination key. Returns size of destination string after operation. Redis Docs
Source§

#### fn bit_or<'a, D: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, srckeys: S, ) -> RedisResult<usize>

Perform a bitwise OR between multiple keys (containing string values) and store the result in the destination key. Returns size of destination string after operation. Redis Docs
Source§

#### fn bit_xor<'a, D: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, srckeys: S, ) -> RedisResult<usize>

Perform a bitwise XOR between multiple keys (containing string values) and store the result in the destination key. Returns size of destination string after operation. Redis Docs
Source§

#### fn bit_not<'a, D: ToSingleRedisArg + Send + Sync + 'a, S: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, dstkey: D, srckey: S, ) -> RedisResult<usize>

Perform a bitwise NOT of the key (containing string values) and store the result in the destination key. Returns size of destination string after operation. Redis Docs
Source§

#### fn bit_diff<'a, D: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, srckeys: S, ) -> RedisResult<usize>

DIFF(X, Y1, Y2, …)
Perform a set difference to extract the members of X that are not members of any of Y1, Y2,….
Logical representation: X ∧ ¬(Y1 ∨ Y2 ∨ …)
Redis Docs
Source§

#### fn bit_diff1<'a, D: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, srckeys: S, ) -> RedisResult<usize>

DIFF1(X, Y1, Y2, …) (Relative complement difference)
Perform a relative complement set difference to extract the members of one or more of Y1, Y2,… that are not members of X.
Logical representation: ¬X ∧ (Y1 ∨ Y2 ∨ …)
Redis Docs
Source§

#### fn bit_and_or<'a, D: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, srckeys: S, ) -> RedisResult<usize>

ANDOR(X, Y1, Y2, …)
Perform an “intersection of union(s)” operation to extract the members of X that are also members of one or more of Y1, Y2,….
Logical representation: X ∧ (Y1 ∨ Y2 ∨ …)
Redis Docs
Source§

#### fn bit_one<'a, D: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, srckeys: S, ) -> RedisResult<usize>

ONE(X, Y1, Y2, …)
Perform an “exclusive membership” operation to extract the members of exactly one of X, Y1, Y2, ….
Logical representation: (X ∨ Y1 ∨ Y2 ∨ …) ∧ ¬((X ∧ Y1) ∨ (X ∧ Y2) ∨ (Y1 ∧ Y2) ∨ (Y1 ∧ Y3) ∨ …)
Redis Docs
Source§

#### fn strlen<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<usize>

Get the length of the value stored in a key. 0 if key does not exist. Redis Docs
Source§

#### fn hget<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, field: F, ) -> RedisResult<Option<String>>

Gets a single (or multiple) fields from a hash.
Source§

#### fn hmget<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, fields: F, ) -> RedisResult<Vec<String>>

Gets multiple fields from a hash. Redis Docs
Source§

#### fn hget_ex<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, fields: F, expire_at: Expiry, ) -> RedisResult<Vec<String>>

Get the value of one or more fields of a given hash key, and optionally set their expiration Redis Docs
Source§

#### fn hdel<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, field: F, ) -> RedisResult<usize>

Deletes a single (or multiple) fields from a hash. Returns number of fields deleted. Redis Docs
Source§

#### fn hget_del<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, fields: F, ) -> RedisResult<Vec<Option<String>>>

Get and delete the value of one or more fields of a given hash key Redis Docs
Source§

#### fn hset<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, field: F, value: V, ) -> RedisResult<usize>

Sets a single field in a hash. Returns number of fields added. Redis Docs
Source§

#### fn hset_ex<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, hash_field_expiration_options: &'a HashFieldExpirationOptions, fields_values: &'a [(F, V)], ) -> RedisResult<bool>

Set the value of one or more fields of a given hash key, and optionally set their expiration Redis Docs
Source§

#### fn hset_nx<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, field: F, value: V, ) -> RedisResult<bool>

Sets a single field in a hash if it does not exist. Returns whether the field was added. Redis Docs
Source§

#### fn hset_multiple<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, items: &'a [(F, V)], ) -> RedisResult<()>

Sets multiple fields in a hash. Redis Docs
Source§

#### fn hincr<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToSingleRedisArg + Send + Sync + 'a, D: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, field: F, delta: D, ) -> RedisResult<f64>

Increments a value. Returns the new value of the field after incrementation.
Source§

#### fn hexists<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, field: F, ) -> RedisResult<bool>

Checks if a field in a hash exists. Redis Docs
Source§

#### fn httl<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, fields: F, ) -> RedisResult<Vec<IntegerReplyOrNoOp>>

Get one or more fields’ TTL in seconds. Redis Docs
Source§

#### fn hpttl<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, fields: F, ) -> RedisResult<Vec<IntegerReplyOrNoOp>>

Get one or more fields’ TTL in milliseconds. Redis Docs
Source§

#### fn hexpire<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, seconds: i64, opt: ExpireOption, fields: F, ) -> RedisResult<Vec<IntegerReplyOrNoOp>>

Set one or more fields’ time to live in seconds. Returns an array where each element corresponds to the field at the same index in the fields argument. Each element of the array is either: 0 if the specified condition has not been met. 1 if the expiration time was updated. 2 if called with 0 seconds. Errors if provided key exists but is not a hash. Redis Docs
Source§

#### fn hexpire_at<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, ts: i64, opt: ExpireOption, fields: F, ) -> RedisResult<Vec<IntegerReplyOrNoOp>>

Set the expiration for one or more fields as a UNIX timestamp in seconds. Returns an array where each element corresponds to the field at the same index in the fields argument. Each element of the array is either: 0 if the specified condition has not been met. 1 if the expiration time was updated. 2 if called with a time in the past. Errors if provided key exists but is not a hash. Redis Docs
Source§

#### fn hexpire_time<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, fields: F, ) -> RedisResult<Vec<IntegerReplyOrNoOp>>

Returns the absolute Unix expiration timestamp in seconds. Redis Docs
Source§

#### fn hpersist<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, fields: F, ) -> RedisResult<Vec<IntegerReplyOrNoOp>>

Remove the expiration from a key. Returns 1 if the expiration was removed. Redis Docs
Source§

#### fn hpexpire<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, milliseconds: i64, opt: ExpireOption, fields: F, ) -> RedisResult<Vec<IntegerReplyOrNoOp>>

Set one or more fields’ time to live in milliseconds. Returns an array where each element corresponds to the field at the same index in the fields argument. Each element of the array is either: 0 if the specified condition has not been met. 1 if the expiration time was updated. 2 if called with 0 seconds. Errors if provided key exists but is not a hash. Redis Docs
Source§

#### fn hpexpire_at<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, ts: i64, opt: ExpireOption, fields: F, ) -> RedisResult<Vec<IntegerReplyOrNoOp>>

Set the expiration for one or more fields as a UNIX timestamp in milliseconds. Returns an array where each element corresponds to the field at the same index in the fields argument. Each element of the array is either: 0 if the specified condition has not been met. 1 if the expiration time was updated. 2 if called with a time in the past. Errors if provided key exists but is not a hash. Redis Docs
Source§

#### fn hpexpire_time<'a, K: ToSingleRedisArg + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, fields: F, ) -> RedisResult<Vec<IntegerReplyOrNoOp>>

Returns the absolute Unix expiration timestamp in seconds. Redis Docs
Source§

#### fn hkeys<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<Vec<String>>

Gets all the keys in a hash. Redis Docs
Source§

#### fn hvals<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<Vec<String>>

Gets all the values in a hash. Redis Docs
Source§

#### fn hgetall<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<HashMap<String, String>>

Gets all the fields and values in a hash. Redis Docs
Source§

#### fn hlen<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<usize>

Gets the length of a hash. Returns 0 if key does not exist. Redis Docs
Source§

#### fn blmove<'a, S: ToSingleRedisArg + Send + Sync + 'a, D: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, srckey: S, dstkey: D, src_dir: Direction, dst_dir: Direction, timeout: f64, ) -> RedisResult<Option<String>>

Pop an element from a list, push it to another list and return it; or block until one is available Redis Docs
Source§

#### fn blmpop<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, timeout: f64, numkeys: usize, key: K, dir: Direction, count: usize, ) -> RedisResult<Option<[String; 2]>>

Pops `count` elements from the first non-empty list key from the list of provided key names; or blocks until one is available. Redis Docs
Source§

#### fn blpop<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, timeout: f64, ) -> RedisResult<Option<[String; 2]>>

Remove and get the first element in a list, or block until one is available. Redis Docs
Source§

#### fn brpop<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, timeout: f64, ) -> RedisResult<Option<[String; 2]>>

Remove and get the last element in a list, or block until one is available. Redis Docs
Source§

#### fn brpoplpush<'a, S: ToSingleRedisArg + Send + Sync + 'a, D: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, srckey: S, dstkey: D, timeout: f64, ) -> RedisResult<Option<String>>

Pop a value from a list, push it to another list and return it; or block until one is available. Redis Docs
Source§

#### fn lindex<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, index: isize, ) -> RedisResult<Option<String>>

Get an element from a list by its index. Redis Docs
Source§

#### fn linsert_before<'a, K: ToSingleRedisArg + Send + Sync + 'a, P: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, pivot: P, value: V, ) -> RedisResult<isize>

Insert an element before another element in a list. Redis Docs
Source§

#### fn linsert_after<'a, K: ToSingleRedisArg + Send + Sync + 'a, P: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, pivot: P, value: V, ) -> RedisResult<isize>

Insert an element after another element in a list. Redis Docs
Source§

#### fn llen<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<usize>

Returns the length of the list stored at key. Redis Docs
Source§

#### fn lmove<'a, S: ToSingleRedisArg + Send + Sync + 'a, D: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, srckey: S, dstkey: D, src_dir: Direction, dst_dir: Direction, ) -> RedisResult<String>

Pop an element a list, push it to another list and return it Redis Docs
Source§

#### fn lmpop<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, numkeys: usize, key: K, dir: Direction, count: usize, ) -> RedisResult<Option<(String, Vec<String>)>>

Pops `count` elements from the first non-empty list key from the list of provided key names. Redis Docs
Source§

#### fn lpop<'a, RV: FromRedisValue, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, count: Option<NonZeroUsize>, ) -> RedisResult<RV>

Removes and returns the up to `count` first elements of the list stored at key. Read more
Source§

#### fn lpos<'a, RV: FromRedisValue, K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, value: V, options: LposOptions, ) -> RedisResult<RV>

Returns the index of the first matching value of the list stored at key. Redis Docs
Source§

#### fn lpush<'a, K: ToSingleRedisArg + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, value: V, ) -> RedisResult<usize>

Insert all the specified values at the head of the list stored at key. Redis Docs
Source§

#### fn lpush_exists<'a, K: ToSingleRedisArg + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, value: V, ) -> RedisResult<usize>

Inserts a value at the head of the list stored at key, only if key already exists and holds a list. Redis Docs
Source§

#### fn lrange<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, start: isize, stop: isize, ) -> RedisResult<Vec<String>>

Returns the specified elements of the list stored at key. Redis Docs
Source§

#### fn lrem<'a, K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, count: isize, value: V, ) -> RedisResult<usize>

Removes the first count occurrences of elements equal to value from the list stored at key. Redis Docs
Source§

#### fn ltrim<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, start: isize, stop: isize, ) -> RedisResult<()>

Trim an existing list so that it will contain only the specified range of elements specified. Redis Docs
Source§

#### fn lset<'a, K: ToSingleRedisArg + Send + Sync + 'a, V: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, index: isize, value: V, ) -> RedisResult<()>

Sets the list element at index to value Redis Docs
Source§

#### fn ping<'a>(&'a mut self) -> RedisResult<String>

Sends a ping to the server Redis Docs
Source§

#### fn ping_message<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, message: K, ) -> RedisResult<String>

Sends a ping with a message to the server Redis Docs
Source§

#### fn rpop<'a, RV: FromRedisValue, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, count: Option<NonZeroUsize>, ) -> RedisResult<RV>

Removes and returns the up to `count` last elements of the list stored at key Read more
Source§

#### fn rpoplpush<'a, K: ToSingleRedisArg + Send + Sync + 'a, D: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, dstkey: D, ) -> RedisResult<Option<String>>

Pop a value from a list, push it to another list and return it. Redis Docs
Source§

#### fn rpush<'a, K: ToSingleRedisArg + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, value: V, ) -> RedisResult<usize>

Insert all the specified values at the tail of the list stored at key. Redis Docs
Source§

#### fn rpush_exists<'a, K: ToSingleRedisArg + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, value: V, ) -> RedisResult<usize>

Inserts value at the tail of the list stored at key, only if key already exists and holds a list. Redis Docs
Source§

#### fn sadd<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, member: M, ) -> RedisResult<usize>

Add one or more members to a set. Redis Docs
Source§

#### fn scard<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<usize>

Get the number of members in a set. Redis Docs
Source§

#### fn sdiff<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, keys: K, ) -> RedisResult<HashSet<String>>

Subtract multiple sets. Redis Docs
Source§

#### fn sdiffstore<'a, D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, keys: K, ) -> RedisResult<usize>

Subtract multiple sets and store the resulting set in a key. Redis Docs
Source§

#### fn sinter<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, keys: K, ) -> RedisResult<HashSet<String>>

Intersect multiple sets. Redis Docs
Source§

#### fn sinterstore<'a, D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, keys: K, ) -> RedisResult<usize>

Intersect multiple sets and store the resulting set in a key. Redis Docs
Source§

#### fn sismember<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, member: M, ) -> RedisResult<bool>

Determine if a given value is a member of a set. Redis Docs
Source§

#### fn smismember<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, members: M, ) -> RedisResult<Vec<bool>>

Determine if given values are members of a set. Redis Docs
Source§

#### fn smembers<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<HashSet<String>>

Get all the members in a set. Redis Docs
Source§

#### fn smove<'a, S: ToSingleRedisArg + Send + Sync + 'a, D: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, srckey: S, dstkey: D, member: M, ) -> RedisResult<bool>

Move a member from one set to another. Redis Docs
Source§

#### fn spop<'a, RV: FromRedisValue, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<RV>

Remove and return a random member from a set. Redis Docs
Source§

#### fn srandmember<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<Option<String>>

Get one random member from a set. Redis Docs
Source§

#### fn srandmember_multiple<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, count: isize, ) -> RedisResult<Vec<String>>

Get multiple random members from a set. Redis Docs
Source§

#### fn srem<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, member: M, ) -> RedisResult<usize>

Remove one or more members from a set. Redis Docs
Source§

#### fn sunion<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, keys: K, ) -> RedisResult<HashSet<String>>

Add multiple sets. Redis Docs
Source§

#### fn sunionstore<'a, D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, keys: K, ) -> RedisResult<usize>

Add multiple sets and store the resulting set in a key. Redis Docs
Source§

#### fn zadd<'a, K: ToSingleRedisArg + Send + Sync + 'a, S: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, member: M, score: S, ) -> RedisResult<usize>

Add one member to a sorted set, or update its score if it already exists. Redis Docs
Source§

#### fn zadd_multiple<'a, K: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, items: &'a [(S, M)], ) -> RedisResult<usize>

Add multiple members to a sorted set, or update its score if it already exists. Redis Docs
Source§

#### fn zadd_options<'a, K: ToSingleRedisArg + Send + Sync + 'a, S: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, member: M, score: S, options: &'a SortedSetAddOptions, ) -> RedisResult<usize>

Add one member to a sorted set, or update its score if it already exists. Redis Docs
Source§

#### fn zadd_multiple_options<'a, K: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, items: &'a [(S, M)], options: &'a SortedSetAddOptions, ) -> RedisResult<usize>

Add multiple members to a sorted set, or update its score if it already exists. Redis Docs
Source§

#### fn zcard<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<usize>

Get the number of members in a sorted set. Redis Docs
Source§

#### fn zcount<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, min: M, max: MM, ) -> RedisResult<usize>

Count the members in a sorted set with scores within the given values. Redis Docs
Source§

#### fn zincr<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, D: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, member: M, delta: D, ) -> RedisResult<f64>

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. Redis Docs
Source§

#### fn zinterstore<'a, D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, keys: K, ) -> RedisResult<usize>

Intersect multiple sorted sets and store the resulting sorted set in a new key using SUM as aggregation function. Redis Docs
Source§

#### fn zinterstore_min<'a, D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, keys: K, ) -> RedisResult<usize>

Intersect multiple sorted sets and store the resulting sorted set in a new key using MIN as aggregation function. Redis Docs
Source§

#### fn zinterstore_max<'a, D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, keys: K, ) -> RedisResult<usize>

Intersect multiple sorted sets and store the resulting sorted set in a new key using MAX as aggregation function. Redis Docs
Source§

#### fn zinterstore_weights<'a, D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a, W: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, keys: &'a [(K, W)], ) -> RedisResult<usize>

`Commands::zinterstore`, but with the ability to specify a multiplication factor for each sorted set by pairing one with each key in a tuple. Redis Docs
Source§

#### fn zinterstore_min_weights<'a, D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a, W: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, keys: &'a [(K, W)], ) -> RedisResult<usize>

`Commands::zinterstore_min`, but with the ability to specify a multiplication factor for each sorted set by pairing one with each key in a tuple. Redis Docs
Source§

#### fn zinterstore_max_weights<'a, D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a, W: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, keys: &'a [(K, W)], ) -> RedisResult<usize>

`Commands::zinterstore_max`, but with the ability to specify a multiplication factor for each sorted set by pairing one with each key in a tuple. Redis Docs
Source§

#### fn zlexcount<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, min: M, max: MM, ) -> RedisResult<usize>

Count the number of members in a sorted set between a given lexicographical range. Redis Docs
Source§

#### fn bzpopmax<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, timeout: f64, ) -> RedisResult<Option<(String, String, f64)>>

Removes and returns the member with the highest score in a sorted set. Blocks until a member is available otherwise. Redis Docs
Source§

#### fn zpopmax<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, count: isize, ) -> RedisResult<Vec<String>>

Removes and returns up to count members with the highest scores in a sorted set Redis Docs
Source§

#### fn bzpopmin<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, timeout: f64, ) -> RedisResult<Option<(String, String, f64)>>

Removes and returns the member with the lowest score in a sorted set. Blocks until a member is available otherwise. Redis Docs
Source§

#### fn zpopmin<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, count: isize, ) -> RedisResult<Vec<String>>

Removes and returns up to count members with the lowest scores in a sorted set Redis Docs
Source§

#### fn bzmpop_max<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, timeout: f64, keys: K, count: isize, ) -> RedisResult<Option<(String, Vec<(String, f64)>)>>

Removes and returns up to count members with the highest scores, from the first non-empty sorted set in the provided list of key names. Blocks until a member is available otherwise. Redis Docs
Source§

#### fn zmpop_max<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, keys: K, count: isize, ) -> RedisResult<Option<(String, Vec<(String, f64)>)>>

Removes and returns up to count members with the highest scores, from the first non-empty sorted set in the provided list of key names. Redis Docs
Source§

#### fn bzmpop_min<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, timeout: f64, keys: K, count: isize, ) -> RedisResult<Option<(String, Vec<(String, f64)>)>>

Removes and returns up to count members with the lowest scores, from the first non-empty sorted set in the provided list of key names. Blocks until a member is available otherwise. Redis Docs
Source§

#### fn zmpop_min<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, keys: K, count: isize, ) -> RedisResult<Option<(String, Vec<(String, f64)>)>>

Removes and returns up to count members with the lowest scores, from the first non-empty sorted set in the provided list of key names. Redis Docs
Source§

#### fn zrandmember<'a, RV: FromRedisValue, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, count: Option<isize>, ) -> RedisResult<RV>

Return up to count random members in a sorted set (or 1 if `count == None`) Redis Docs
Source§

#### fn zrandmember_withscores<'a, RV: FromRedisValue, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, count: isize, ) -> RedisResult<RV>

Return up to count random members in a sorted set with scores Redis Docs
Source§

#### fn zrange<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, start: isize, stop: isize, ) -> RedisResult<Vec<String>>

Return a range of members in a sorted set, by index Redis Docs
Source§

#### fn zrange_withscores<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, start: isize, stop: isize, ) -> RedisResult<Vec<(String, f64)>>

Return a range of members in a sorted set, by index with scores. Redis Docs
Source§

#### fn zrangebylex<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, min: M, max: MM, ) -> RedisResult<Vec<String>>

Return a range of members in a sorted set, by lexicographical range. Redis Docs
Source§

#### fn zrangebylex_limit<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, min: M, max: MM, offset: isize, count: isize, ) -> RedisResult<Vec<String>>

Return a range of members in a sorted set, by lexicographical range with offset and limit. Redis Docs
Source§

#### fn zrevrangebylex<'a, K: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, max: MM, min: M, ) -> RedisResult<Vec<String>>

Return a range of members in a sorted set, by lexicographical range. Redis Docs
Source§

#### fn zrevrangebylex_limit<'a, K: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, max: MM, min: M, offset: isize, count: isize, ) -> RedisResult<Vec<String>>

Return a range of members in a sorted set, by lexicographical range with offset and limit. Redis Docs
Source§

#### fn zrangebyscore<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, min: M, max: MM, ) -> RedisResult<Vec<String>>

Return a range of members in a sorted set, by score. Redis Docs
Source§

#### fn zrangebyscore_withscores<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, min: M, max: MM, ) -> RedisResult<Vec<(String, usize)>>

Return a range of members in a sorted set, by score with scores. Redis Docs
Source§

#### fn zrangebyscore_limit<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, min: M, max: MM, offset: isize, count: isize, ) -> RedisResult<Vec<String>>

Return a range of members in a sorted set, by score with limit. Redis Docs
Source§

#### fn zrangebyscore_limit_withscores<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, min: M, max: MM, offset: isize, count: isize, ) -> RedisResult<Vec<(String, usize)>>

Return a range of members in a sorted set, by score with limit with scores. Redis Docs
Source§

#### fn zrank<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, member: M, ) -> RedisResult<Option<usize>>

Determine the index of a member in a sorted set. Redis Docs
Source§

#### fn zrem<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, members: M, ) -> RedisResult<usize>

Remove one or more members from a sorted set. Redis Docs
Source§

#### fn zrembylex<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, min: M, max: MM, ) -> RedisResult<usize>

Remove all members in a sorted set between the given lexicographical range. Redis Docs
Source§

#### fn zremrangebyrank<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, start: isize, stop: isize, ) -> RedisResult<usize>

Remove all members in a sorted set within the given indexes. Redis Docs
Source§

#### fn zrembyscore<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, min: M, max: MM, ) -> RedisResult<usize>

Remove all members in a sorted set within the given scores. Redis Docs
Source§

#### fn zrevrange<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, start: isize, stop: isize, ) -> RedisResult<Vec<String>>

Return a range of members in a sorted set, by index, ordered from high to low. Redis Docs
Source§

#### fn zrevrange_withscores<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, start: isize, stop: isize, ) -> RedisResult<Vec<String>>

Return a range of members in a sorted set, by index, with scores ordered from high to low. Redis Docs
Source§

#### fn zrevrangebyscore<'a, K: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, max: MM, min: M, ) -> RedisResult<Vec<String>>

Return a range of members in a sorted set, by score. Redis Docs
Source§

#### fn zrevrangebyscore_withscores<'a, K: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, max: MM, min: M, ) -> RedisResult<Vec<String>>

Return a range of members in a sorted set, by score with scores. Redis Docs
Source§

#### fn zrevrangebyscore_limit<'a, K: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, max: MM, min: M, offset: isize, count: isize, ) -> RedisResult<Vec<String>>

Return a range of members in a sorted set, by score with limit. Redis Docs
Source§

#### fn zrevrangebyscore_limit_withscores<'a, K: ToSingleRedisArg + Send + Sync + 'a, MM: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, max: MM, min: M, offset: isize, count: isize, ) -> RedisResult<Vec<String>>

Return a range of members in a sorted set, by score with limit with scores. Redis Docs
Source§

#### fn zrevrank<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, member: M, ) -> RedisResult<Option<usize>>

Determine the index of a member in a sorted set, with scores ordered from high to low. Redis Docs
Source§

#### fn zscore<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, member: M, ) -> RedisResult<Option<f64>>

Get the score associated with the given member in a sorted set. Redis Docs
Source§

#### fn zscore_multiple<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, members: &'a [M], ) -> RedisResult<Option<Vec<f64>>>

Get the scores associated with multiple members in a sorted set. Redis Docs
Source§

#### fn zunionstore<'a, D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, keys: K, ) -> RedisResult<usize>

Unions multiple sorted sets and store the resulting sorted set in a new key using SUM as aggregation function. Redis Docs
Source§

#### fn zunionstore_min<'a, D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, keys: K, ) -> RedisResult<usize>

Unions multiple sorted sets and store the resulting sorted set in a new key using MIN as aggregation function. Redis Docs
Source§

#### fn zunionstore_max<'a, D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, keys: K, ) -> RedisResult<usize>

Unions multiple sorted sets and store the resulting sorted set in a new key using MAX as aggregation function. Redis Docs
Source§

#### fn zunionstore_weights<'a, D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a, W: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, keys: &'a [(K, W)], ) -> RedisResult<usize>

`Commands::zunionstore`, but with the ability to specify a multiplication factor for each sorted set by pairing one with each key in a tuple. Redis Docs
Source§

#### fn zunionstore_min_weights<'a, D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a, W: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, keys: &'a [(K, W)], ) -> RedisResult<usize>

`Commands::zunionstore_min`, but with the ability to specify a multiplication factor for each sorted set by pairing one with each key in a tuple. Redis Docs
Source§

#### fn zunionstore_max_weights<'a, D: ToSingleRedisArg + Send + Sync + 'a, K: ToRedisArgs + Send + Sync + 'a, W: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, keys: &'a [(K, W)], ) -> RedisResult<usize>

`Commands::zunionstore_max`, but with the ability to specify a multiplication factor for each sorted set by pairing one with each key in a tuple. Redis Docs
Source§

#### fn vadd<'a, K: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, input: VectorAddInput<'a>, element: E, ) -> RedisResult<bool>

Available on crate feature `vector-sets` only.
Add a new element into the vector set specified by key. Redis Docs
Source§

#### fn vadd_options<'a, K: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, input: VectorAddInput<'a>, element: E, options: &'a VAddOptions, ) -> RedisResult<bool>

Available on crate feature `vector-sets` only.
Add a new element into the vector set specified by key with optional parameters for fine-tuning the insertion process. Redis Docs
Source§

#### fn vcard<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<usize>

Available on crate feature `vector-sets` only.
Get the number of members in a vector set. Redis Docs
Source§

#### fn vdim<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<usize>

Available on crate feature `vector-sets` only.
Return the number of dimensions of the vectors in the specified vector set. Redis Docs
Source§

#### fn vemb<'a, RV: FromRedisValue, K: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, element: E, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Return the approximate vector associated with a given element in the vector set. Redis Docs
Source§

#### fn vemb_options<'a, RV: FromRedisValue, K: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, element: E, options: &'a VEmbOptions, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Return the raw internal representation of the approximate vector associated with a given element in the vector set. Vector sets normalize and may quantize vectors on insertion. VEMB reverses this process to approximate the original vector by de-normalizing and de-quantizing it. Redis Docs
Source§

#### fn vrem<'a, K: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, element: E, ) -> RedisResult<bool>

Available on crate feature `vector-sets` only.
Remove an element from a vector set. Redis Docs
Source§

#### fn vsetattr<'a, K: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a, J: Serialize + Send + Sync + 'a>( &'a mut self, key: K, element: E, json_object: &'a J, ) -> RedisResult<bool>

Available on crate feature `vector-sets` only.
Associate a JSON object with an element in a vector set. Use this command to store attributes that can be used in filtered similarity searches with VSIM. Redis Docs
Source§

#### fn vdelattr<'a, K: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, element: E, ) -> RedisResult<bool>

Available on crate feature `vector-sets` only.
Delete the JSON attributes associated with an element in a vector set. This is an utility function that uses VSETATTR with an empty string. Redis Docs
Source§

#### fn vgetattr<'a, K: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, element: E, ) -> RedisResult<Option<String>>

Available on crate feature `vector-sets` only.
Return the JSON attributes associated with an element in a vector set. Redis Docs
Source§

#### fn vinfo<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<Option<HashMap<String, Value>>>

Available on crate feature `vector-sets` only.
Return metadata and internal details about a vector set, including size, dimensions, quantization type, and graph structure. Redis Docs
Source§

#### fn vlinks<'a, RV: FromRedisValue, K: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, element: E, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Return the neighbors of a specified element in a vector set. The command shows the connections for each layer of the HNSW graph. Redis Docs
Source§

#### fn vlinks_with_scores<'a, RV: FromRedisValue, K: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, element: E, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Return the neighbors of a specified element in a vector set. The command shows the connections for each layer of the HNSW graph and includes similarity scores for each neighbor. Redis Docs]
Source§

#### fn vrandmember<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<Option<String>>

Available on crate feature `vector-sets` only.
Return one random elements from a vector set. Redis Docs
Source§

#### fn vrandmember_multiple<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, count: usize, ) -> RedisResult<Vec<String>>

Available on crate feature `vector-sets` only.
Return multiple random elements from a vector set. Redis Docs
Source§

#### fn vsim<'a, RV: FromRedisValue, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, input: VectorSimilaritySearchInput<'a>, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Perform vector similarity search. Redis Docs
Source§

#### fn vsim_options<'a, RV: FromRedisValue, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, input: VectorSimilaritySearchInput<'a>, options: &'a VSimOptions, ) -> RedisResult<RV>

Available on crate feature `vector-sets` only.
Performs a vector similarity search with optional parameters for customization. Redis Docs
Source§

#### fn pfadd<'a, K: ToSingleRedisArg + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, element: E, ) -> RedisResult<bool>

Adds the specified elements to the specified HyperLogLog. Redis Docs
Source§

#### fn pfcount<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<usize>

Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s). Redis Docs
Source§

#### fn pfmerge<'a, D: ToSingleRedisArg + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a>( &'a mut self, dstkey: D, srckeys: S, ) -> RedisResult<()>

Merge N different HyperLogLogs into a single one. Redis Docs
Source§

#### fn publish<'a, K: ToSingleRedisArg + Send + Sync + 'a, E: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, channel: K, message: E, ) -> RedisResult<usize>

Posts a message to the given channel. Redis Docs
Source§

#### fn spublish<'a, K: ToSingleRedisArg + Send + Sync + 'a, E: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, channel: K, message: E, ) -> RedisResult<usize>

Posts a message to the given sharded channel. Redis Docs
Source§

#### fn object_encoding<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<Option<String>>

Returns the encoding of a key. Redis Docs
Source§

#### fn object_idletime<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<Option<usize>>

Returns the time in seconds since the last access of a key. Redis Docs
Source§

#### fn object_freq<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<Option<usize>>

Returns the logarithmic access frequency counter of a key. Redis Docs
Source§

#### fn object_refcount<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<Option<usize>>

Returns the reference count of a key. Redis Docs
Source§

#### fn client_getname<'a>(&'a mut self) -> RedisResult<Option<String>>

Returns the name of the current connection as set by CLIENT SETNAME. Redis Docs
Source§

#### fn client_id<'a>(&'a mut self) -> RedisResult<isize>

Returns the ID of the current connection. Redis Docs
Source§

#### fn client_setname<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, connection_name: K, ) -> RedisResult<()>

Command assigns a name to the current connection. Redis Docs
Source§

#### fn acl_load<'a>(&'a mut self) -> RedisResult<()>

Available on crate feature `acl` only.
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. Redis Docs
Source§

#### fn acl_save<'a>(&'a mut self) -> RedisResult<()>

Available on crate feature `acl` only.
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. Redis Docs
Source§

#### fn acl_list<'a>(&'a mut self) -> RedisResult<Vec<String>>

Available on crate feature `acl` only.
Shows the currently active ACL rules in the Redis server. Redis Docs
Source§

#### fn acl_users<'a>(&'a mut self) -> RedisResult<Vec<String>>

Available on crate feature `acl` only.
Shows a list of all the usernames of the currently configured users in the Redis ACL system. Redis Docs
Source§

#### fn acl_getuser<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, username: K, ) -> RedisResult<Option<AclInfo>>

Available on crate feature `acl` only.
Returns all the rules defined for an existing ACL user. Redis Docs
Source§

#### fn acl_setuser<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, username: K, ) -> RedisResult<()>

Available on crate feature `acl` only.
Creates an ACL user without any privilege. Redis Docs
Source§

#### fn acl_setuser_rules<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, username: K, rules: &'a [Rule], ) -> RedisResult<()>

Available on crate feature `acl` only.
Creates an ACL user with the specified rules or modify the rules of an existing user. Redis Docs
Source§

#### fn acl_deluser<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, usernames: &'a [K], ) -> RedisResult<usize>

Available on crate feature `acl` only.
Delete all the specified ACL users and terminate all the connections that are authenticated with such users. Redis Docs
Source§

#### fn acl_dryrun<'a, K: ToSingleRedisArg + Send + Sync + 'a, C: ToSingleRedisArg + Send + Sync + 'a, A: ToRedisArgs + Send + Sync + 'a>( &'a mut self, username: K, command: C, args: A, ) -> RedisResult<String>

Available on crate feature `acl` only.
Simulate the execution of a given command by a given user. Redis Docs
Source§

#### fn acl_cat<'a>(&'a mut self) -> RedisResult<HashSet<String>>

Available on crate feature `acl` only.
Shows the available ACL categories. Redis Docs
Source§

#### fn acl_cat_categoryname<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, categoryname: K, ) -> RedisResult<HashSet<String>>

Available on crate feature `acl` only.
Shows all the Redis commands in the specified category. Redis Docs
Source§

#### fn acl_genpass<'a>(&'a mut self) -> RedisResult<String>

Available on crate feature `acl` only.
Generates a 256-bits password starting from /dev/urandom if available. Redis Docs
Source§

#### fn acl_genpass_bits<'a>(&'a mut self, bits: isize) -> RedisResult<String>

Available on crate feature `acl` only.
Generates a 1-to-1024-bits password starting from /dev/urandom if available. Redis Docs
Source§

#### fn acl_whoami<'a>(&'a mut self) -> RedisResult<String>

Available on crate feature `acl` only.
Returns the username the current connection is authenticated with. Redis Docs
Source§

#### fn acl_log<'a>(&'a mut self, count: isize) -> RedisResult<Vec<String>>

Available on crate feature `acl` only.
Shows a list of recent ACL security events Redis Docs
Source§

#### fn acl_log_reset<'a>(&'a mut self) -> RedisResult<()>

Available on crate feature `acl` only.
Clears the ACL log. Redis Docs
Source§

#### fn acl_help<'a>(&'a mut self) -> RedisResult<Vec<String>>

Available on crate feature `acl` only.
Returns a helpful text describing the different subcommands. Redis Docs
Source§

#### fn geo_add<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, members: M, ) -> RedisResult<usize>

Available on crate feature `geospatial` only.
Adds the specified geospatial items to the specified key. Read more
Source§

#### fn geo_dist<'a, K: ToSingleRedisArg + Send + Sync + 'a, M1: ToSingleRedisArg + Send + Sync + 'a, M2: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, member1: M1, member2: M2, unit: Unit, ) -> RedisResult<Option<f64>>

Available on crate feature `geospatial` only.
Return the distance between two members in the geospatial index represented by the sorted set. Read more
Source§

#### fn geo_hash<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, members: M, ) -> RedisResult<Vec<String>>

Available on crate feature `geospatial` only.
Return valid Geohash strings representing the position of one or more members of the geospatial index represented by the sorted set at key. Read more
Source§

#### fn geo_pos<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, members: M, ) -> RedisResult<Vec<Option<Coord<f64>>>>

Available on crate feature `geospatial` only.
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<'a, K: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, longitude: f64, latitude: f64, radius: f64, unit: Unit, options: RadiusOptions, ) -> RedisResult<Vec<RadiusSearchResult>>

Available on crate feature `geospatial` only.
Return the members of a sorted set populated with geospatial information using `geo_add`, which are within the borders of the area specified with the center location and the maximum distance from the center (the radius). Read more
Source§

#### fn geo_radius_by_member<'a, K: ToSingleRedisArg + Send + Sync + 'a, M: ToSingleRedisArg + Send + Sync + 'a>( &'a mut self, key: K, member: M, radius: f64, unit: Unit, options: RadiusOptions, ) -> RedisResult<Vec<RadiusSearchResult>>

Available on crate feature `geospatial` only.
Retrieve members selected by distance with the center of `member`. The member itself is always contained in the results. Redis Docs
Source§

#### fn xack<'a, K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, I: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, group: G, ids: &'a [I], ) -> RedisResult<usize>

Available on crate feature `streams` only.
Ack pending stream messages checked out by a consumer. Read more
Source§

#### fn xadd<'a, K: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, id: ID, items: &'a [(F, V)], ) -> RedisResult<Option<String>>

Available on crate feature `streams` only.
Add a stream message by `key`. Use `*` as the `id` for the current timestamp. Read more
Source§

#### fn xadd_map<'a, K: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a, BTM: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, id: ID, map: BTM, ) -> RedisResult<Option<String>>

Available on crate feature `streams` only.
BTreeMap variant for adding a stream message by `key`. Use `*` as the `id` for the current timestamp. Read more
Source§

#### fn xadd_options<'a, K: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a, I: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, id: ID, items: I, options: &'a StreamAddOptions, ) -> RedisResult<Option<String>>

Available on crate feature `streams` only.
Add a stream message with options. Read more
Source§

#### fn xadd_maxlen<'a, K: ToSingleRedisArg + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a, F: ToRedisArgs + Send + Sync + 'a, V: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, maxlen: StreamMaxlen, id: ID, items: &'a [(F, V)], ) -> RedisResult<Option<String>>

Available on crate feature `streams` only.
Add a stream message while capping the stream at a maxlength. Read more
Source§

#### fn xadd_maxlen_map<'a, K: ToSingleRedisArg + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a, BTM: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, maxlen: StreamMaxlen, id: ID, map: BTM, ) -> RedisResult<Option<String>>

Available on crate feature `streams` only.
BTreeMap variant for adding a stream message while capping the stream at a maxlength. Read more
Source§

#### fn xautoclaim_options<'a, K: ToSingleRedisArg + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, C: ToRedisArgs + Send + Sync + 'a, MIT: ToRedisArgs + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, group: G, consumer: C, min_idle_time: MIT, start: S, options: StreamAutoClaimOptions, ) -> RedisResult<StreamAutoClaimReply>

Available on crate feature `streams` only.
Perform a combined xpending and xclaim flow. Read more
Source§

#### fn xclaim<'a, K: ToSingleRedisArg + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, C: ToRedisArgs + Send + Sync + 'a, MIT: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, group: G, consumer: C, min_idle_time: MIT, ids: &'a [ID], ) -> RedisResult<StreamClaimReply>

Available on crate feature `streams` only.
Claim pending, unacked messages, after some period of time, currently checked out by another consumer. Read more
Source§

#### fn xclaim_options<'a, RV: FromRedisValue, K: ToSingleRedisArg + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, C: ToRedisArgs + Send + Sync + 'a, MIT: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, group: G, consumer: C, min_idle_time: MIT, ids: &'a [ID], options: StreamClaimOptions, ) -> RedisResult<RV>

Available on crate feature `streams` only.
This is the optional arguments version for claiming unacked, pending messages currently checked out by another consumer. Read more
Source§

#### fn xdel<'a, K: ToSingleRedisArg + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, ids: &'a [ID], ) -> RedisResult<usize>

Available on crate feature `streams` only.
Deletes a list of `id`s for a given stream `key`. Read more
Source§

#### fn xdel_ex<'a, K: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, ids: &'a [ID], options: StreamDeletionPolicy, ) -> RedisResult<Vec<XDelExStatusCode>>

Available on crate feature `streams` only.
An extension of the Streams `XDEL` command that provides finer control over how message entries are deleted with respect to consumer groups.
Source§

#### fn xack_del<'a, K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, group: G, ids: &'a [ID], options: StreamDeletionPolicy, ) -> RedisResult<Vec<XAckDelStatusCode>>

Available on crate feature `streams` only.
A combination of `XACK` and `XDEL` that acknowledges and attempts to delete a list of `ids` for a given stream `key` and consumer `group`.
Source§

#### fn xgroup_create<'a, K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, group: G, id: ID, ) -> RedisResult<()>

Available on crate feature `streams` only.
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
Source§

#### fn xgroup_createconsumer<'a, K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, C: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, group: G, consumer: C, ) -> RedisResult<bool>

Available on crate feature `streams` only.
This creates a `consumer` explicitly (vs implicit via XREADGROUP) for given stream `key. Read more
Source§

#### fn xgroup_create_mkstream<'a, K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, group: G, id: ID, ) -> RedisResult<()>

Available on crate feature `streams` only.
This is the alternate version for creating a consumer `group` which makes the stream if it doesn’t exist. Read more
Source§

#### fn xgroup_setid<'a, K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, group: G, id: ID, ) -> RedisResult<()>

Available on crate feature `streams` only.
Alter which `id` you want consumers to begin reading from an existing consumer `group`. Read more
Source§

#### fn xgroup_destroy<'a, K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, group: G, ) -> RedisResult<bool>

Available on crate feature `streams` only.
Destroy an existing consumer `group` for a given stream `key` Read more
Source§

#### fn xgroup_delconsumer<'a, K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, C: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, group: G, consumer: C, ) -> RedisResult<usize>

Available on crate feature `streams` only.
This deletes a `consumer` from an existing consumer `group` for given stream `key. Read more
Source§

#### fn xinfo_consumers<'a, K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, group: G, ) -> RedisResult<StreamInfoConsumersReply>

Available on crate feature `streams` only.
This returns all info details about which consumers have read messages for given consumer `group`. Take note of the StreamInfoConsumersReply return type. Read more
Source§

#### fn xinfo_groups<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<StreamInfoGroupsReply>

Available on crate feature `streams` only.
Returns all consumer `group`s created for a given stream `key`. Take note of the StreamInfoGroupsReply return type. Read more
Source§

#### fn xinfo_stream<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<StreamInfoStreamReply>

Available on crate feature `streams` only.
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
Source§

#### fn xlen<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<usize>

Available on crate feature `streams` only.
Returns the number of messages for a given stream `key`. Read more
Source§

#### fn xpending<'a, K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, group: G, ) -> RedisResult<StreamPendingReply>

Available on crate feature `streams` only.
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
Source§

#### fn xpending_count<'a, K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a, C: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, group: G, start: S, end: E, count: C, ) -> RedisResult<StreamPendingCountReply>

Available on crate feature `streams` only.
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<'a, K: ToRedisArgs + Send + Sync + 'a, G: ToRedisArgs + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a, C: ToRedisArgs + Send + Sync + 'a, CN: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, group: G, start: S, end: E, count: C, consumer: CN, ) -> RedisResult<StreamPendingCountReply>

Available on crate feature `streams` only.
An alternate version of `xpending_count` which filters by `consumer` name. Read more
Source§

#### fn xrange<'a, K: ToRedisArgs + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, start: S, end: E, ) -> RedisResult<StreamRangeReply>

Available on crate feature `streams` only.
Returns a range of messages in a given stream `key`. Read more
Source§

#### fn xrange_all<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<StreamRangeReply>

Available on crate feature `streams` only.
A helper method for automatically returning all messages in a stream by `key`. Use with caution! Read more
Source§

#### fn xrange_count<'a, K: ToRedisArgs + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a, C: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, start: S, end: E, count: C, ) -> RedisResult<StreamRangeReply>

Available on crate feature `streams` only.
A method for paginating a stream by `key`. Read more
Source§

#### fn xread<'a, K: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a>( &'a mut self, keys: &'a [K], ids: &'a [ID], ) -> RedisResult<Option<StreamReadReply>>

Available on crate feature `streams` only.
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 more
Source§

#### fn xread_options<'a, K: ToRedisArgs + Send + Sync + 'a, ID: ToRedisArgs + Send + Sync + 'a>( &'a mut self, keys: &'a [K], ids: &'a [ID], options: &'a StreamReadOptions, ) -> RedisResult<Option<StreamReadReply>>

Available on crate feature `streams` only.
This method handles setting optional arguments for `XREAD` or `XREADGROUP` Redis commands. Read more
Source§

#### fn xrevrange<'a, K: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, end: E, start: S, ) -> RedisResult<StreamRangeReply>

Available on crate feature `streams` only.
This is the reverse version of `xrange`. The same rules apply for `start` and `end` here. Read more
Source§

#### fn xrevrange_all<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, ) -> RedisResult<StreamRangeReply>

Available on crate feature `streams` only.
This is the reverse version of `xrange_all`. The same rules apply for `start` and `end` here. Read more
Source§

#### fn xrevrange_count<'a, K: ToRedisArgs + Send + Sync + 'a, E: ToRedisArgs + Send + Sync + 'a, S: ToRedisArgs + Send + Sync + 'a, C: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, end: E, start: S, count: C, ) -> RedisResult<StreamRangeReply>

Available on crate feature `streams` only.
This is the reverse version of `xrange_count`. The same rules apply for `start` and `end` here. Read more
Source§

#### fn xtrim<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, maxlen: StreamMaxlen, ) -> RedisResult<usize>

Available on crate feature `streams` only.
Trim a stream `key` to a MAXLEN count. Read more
Source§

#### fn xtrim_options<'a, K: ToRedisArgs + Send + Sync + 'a>( &'a mut self, key: K, options: &'a StreamTrimOptions, ) -> RedisResult<usize>

Available on crate feature `streams` only.
Trim a stream `key` with full options Read more
Source§

#### fn load_script<'a, RV: FromRedisValue>( &'a mut self, script: &'a Script, ) -> RedisResult<RV>

Available on crate feature `script` only.
Load a script. Read more
Source§

#### fn invoke_script<'a, RV: FromRedisValue>( &'a mut self, invocation: &'a ScriptInvocation<'a>, ) -> RedisResult<RV>

Available on crate feature `script` only.
Invoke a prepared script. Read more
Source§

#### fn flushall<'a>(&'a mut self) -> RedisResult<()>

Deletes all the keys of all databases Read more
Source§

#### fn flushall_options<'a>( &'a mut self, options: &'a FlushAllOptions, ) -> RedisResult<()>

Deletes all the keys of all databases with options Read more
Source§

#### fn flushdb<'a>(&'a mut self) -> RedisResult<()>

Deletes all the keys of the current database Read more
Source§

#### fn flushdb_options<'a>( &'a mut self, options: &'a FlushDbOptions, ) -> RedisResult<()>

Deletes all the keys of the current database with options Read more
Source§

#### fn scan<RV: FromRedisValue>(&mut self) -> RedisResult<Iter<'_, RV>>

Incrementally iterate the keys space.
Source§

#### fn scan_options<RV: FromRedisValue>( &mut self, opts: ScanOptions, ) -> RedisResult<Iter<'_, RV>>

Incrementally iterate the keys space with options.
Source§

#### fn scan_match<P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, pattern: P, ) -> RedisResult<Iter<'_, RV>>

Incrementally iterate the keys space for keys matching a pattern.
Source§

#### fn hscan<K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<Iter<'_, RV>>

Incrementally iterate hash fields and associated values.
Source§

#### fn hscan_match<K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, pattern: P, ) -> RedisResult<Iter<'_, RV>>

Incrementally iterate hash fields and associated values for field names matching a pattern.
Source§

#### fn sscan<K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<Iter<'_, RV>>

Incrementally iterate set elements.
Source§

#### fn sscan_match<K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, pattern: P, ) -> RedisResult<Iter<'_, RV>>

Incrementally iterate set elements for elements matching a pattern.
Source§

#### fn zscan<K: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, ) -> RedisResult<Iter<'_, RV>>

Incrementally iterate sorted set elements.
Source§

#### fn zscan_match<K: ToSingleRedisArg, P: ToSingleRedisArg, RV: FromRedisValue>( &mut self, key: K, pattern: P, ) -> RedisResult<Iter<'_, RV>>

Incrementally iterate sorted set elements for elements matching a pattern.
Source§

#### fn get_int<K: ToSingleRedisArg>(&mut self, key: K) -> RedisResult<Option<isize>>

Get a value from Redis and convert it to an `Option<isize>`.
Source§

#### fn mget_ints<K: ToRedisArgs>( &mut self, key: K, ) -> RedisResult<Vec<Option<isize>>>

Get values from Redis and convert them to `Option<isize>`s.
§

### impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

#### fn vzip(self) -> V

§

### impl<T> WithSubscriber for T

§

#### fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided `Subscriber` to this type, returning a [`WithDispatch`] wrapper. Read more
§

#### fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default `Subscriber` to this type, returning a [`WithDispatch`] wrapper. Read more
§

### impl<T> ErasedDestructor for T
where T: 'static,

§

### impl<T> MaybeSendSync for T