Struct redis_driver::Client
source · [−]pub struct Client { /* private fields */ }
Implementations
sourceimpl Client
impl Client
sourcepub async fn connect(config: impl IntoConfig) -> Result<Self>
pub async fn connect(config: impl IntoConfig) -> Result<Self>
sourcepub async fn send(&self, command: Command) -> Result<Value>
pub async fn send(&self, command: Command) -> Result<Value>
Send an arbitrary command to the server.
This is used primarily intended for implementing high level commands API but may also be used to provide access to new features that lack a direct API.
Arguments
name
- Command name in uppercase.args
- Command arguments which can be provided as arrays (up to 4 elements) or vectors ofBulkString
.
Errors
Any Redis driver Error
that occurs during the send operation
Example
use redis_driver::{resp::cmd, Client, Result};
#[tokio::main]
async fn main() -> Result<()> {
let client = Client::connect("127.0.0.1:6379").await?;
let values: Vec<String> = client
.send(cmd("MGET").arg("key1").arg("key2").arg("key3").arg("key4"))
.await?
.into()?;
println!("{:?}", values);
Ok(())
}
sourcepub fn send_and_forget(&self, command: Command) -> Result<()>
pub fn send_and_forget(&self, command: Command) -> Result<()>
sourcepub async fn create_transaction(
&self
) -> Result<Transaction<TransactionResult0>>
pub async fn create_transaction(
&self
) -> Result<Transaction<TransactionResult0>>
Trait Implementations
sourceimpl BitmapCommands<ClientResult> for Client
impl BitmapCommands<ClientResult> for Client
sourcefn bitcount<K>(&self, key: K, range: BitRange) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
fn bitcount<K>(&self, key: K, range: BitRange) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
Count the number of set bits (population counting) in a string. Read more
sourcefn bitfield<K, C, E, O>(
&self,
key: K,
sub_commands: C
) -> CommandResult<'_, T, Vec<u64>>where
K: Into<BulkString>,
E: Into<BulkString>,
O: Into<BulkString>,
C: ArgsOrCollection<BitFieldSubCommand<E, O>>,
fn bitfield<K, C, E, O>(
&self,
key: K,
sub_commands: C
) -> CommandResult<'_, T, Vec<u64>>where
K: Into<BulkString>,
E: Into<BulkString>,
O: Into<BulkString>,
C: ArgsOrCollection<BitFieldSubCommand<E, O>>,
The command treats a Redis string as an array of bits,
and is capable of addressing specific integer fields
of varying bit widths and arbitrary non (necessary) aligned offset. Read more
sourcefn bitfield_readonly<K, C, E, O>(
&self,
key: K,
get_commands: C
) -> CommandResult<'_, T, Vec<u64>>where
K: Into<BulkString>,
E: Into<BulkString>,
O: Into<BulkString>,
C: ArgsOrCollection<BitFieldGetSubCommand<E, O>>,
fn bitfield_readonly<K, C, E, O>(
&self,
key: K,
get_commands: C
) -> CommandResult<'_, T, Vec<u64>>where
K: Into<BulkString>,
E: Into<BulkString>,
O: Into<BulkString>,
C: ArgsOrCollection<BitFieldGetSubCommand<E, O>>,
Read-only variant of the BITFIELD command.
It is like the original BITFIELD but only accepts GET subcommand
and can safely be used in read-only replicas. Read more
sourcefn bitop<D, K, KK>(
&self,
operation: BitOperation,
dest_key: D,
keys: KK
) -> CommandResult<'_, T, usize>where
D: Into<BulkString>,
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
fn bitop<D, K, KK>(
&self,
operation: BitOperation,
dest_key: D,
keys: KK
) -> CommandResult<'_, T, usize>where
D: Into<BulkString>,
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
Perform a bitwise operation between multiple keys (containing string values)
and store the result in the destination key. Read more
sourcefn bitpos<K>(
&self,
key: K,
bit: u64,
range: BitRange
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
fn bitpos<K>(
&self,
key: K,
bit: u64,
range: BitRange
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
Perform a bitwise operation between multiple keys (containing string values)
and store the result in the destination key. Read more
sourcefn getbit<K>(&self, key: K, offset: u64) -> CommandResult<'_, T, u64>where
K: Into<BulkString>,
fn getbit<K>(&self, key: K, offset: u64) -> CommandResult<'_, T, u64>where
K: Into<BulkString>,
Returns the bit value at offset in the string value stored at key. Read more
sourcefn setbit<K>(&self, key: K, offset: u64, value: u64) -> CommandResult<'_, T, u64>where
K: Into<BulkString>,
fn setbit<K>(&self, key: K, offset: u64, value: u64) -> CommandResult<'_, T, u64>where
K: Into<BulkString>,
Sets or clears the bit at offset in the string value stored at key. Read more
sourceimpl ConnectionCommands<ClientResult> for Client
impl ConnectionCommands<ClientResult> for Client
sourcefn auth<U, P>(&self, username: Option<U>, password: P) -> CommandResult<'_, T, ()>where
U: Into<BulkString>,
P: Into<BulkString>,
fn auth<U, P>(&self, username: Option<U>, password: P) -> CommandResult<'_, T, ()>where
U: Into<BulkString>,
P: Into<BulkString>,
Authenticates the current connection. Read more
sourcefn client_caching(
&self,
mode: ClientCachingMode
) -> CommandResult<'_, T, Option<()>>
fn client_caching(
&self,
mode: ClientCachingMode
) -> CommandResult<'_, T, Option<()>>
This command controls the tracking of the keys in the next command executed by the connection,
when tracking is enabled in OPTIN or OPTOUT mode. Read more
sourcefn client_getname<CN>(&self) -> CommandResult<'_, T, Option<CN>>where
CN: FromValue,
fn client_getname<CN>(&self) -> CommandResult<'_, T, Option<CN>>where
CN: FromValue,
Returns the name of the current connection as set by [CLIENT SETNAME]. Read more
sourcefn client_getredir(&self) -> CommandResult<'_, T, i64>
fn client_getredir(&self) -> CommandResult<'_, T, i64>
This command returns the client ID we are redirecting our tracking notifications to. Read more
sourcefn client_id(&self) -> CommandResult<'_, T, i64>
fn client_id(&self) -> CommandResult<'_, T, i64>
The command just returns the ID of the current connection. Read more
sourcefn client_info(&self) -> CommandResult<'_, T, ClientInfo>
fn client_info(&self) -> CommandResult<'_, T, ClientInfo>
The command returns information and statistics about the current client connection
in a mostly human readable format. Read more
sourcefn client_kill(&self, options: ClientKillOptions) -> CommandResult<'_, T, usize>
fn client_kill(&self, options: ClientKillOptions) -> CommandResult<'_, T, usize>
Closes a given clients connection based on a filter list Read more
sourcefn client_list(
&self,
options: ClientListOptions
) -> CommandResult<'_, T, ClientListResult>
fn client_list(
&self,
options: ClientListOptions
) -> CommandResult<'_, T, ClientListResult>
Returns information and statistics about the client connections server in a mostly human readable format. Read more
sourcefn client_no_evict(&self, no_evict: bool) -> CommandResult<'_, T, ()>
fn client_no_evict(&self, no_evict: bool) -> CommandResult<'_, T, ()>
sets the
client eviction
mode for the current connection. Read moresourcefn client_pause(
&self,
timeout: u64,
mode: ClientPauseMode
) -> CommandResult<'_, T, ()>
fn client_pause(
&self,
timeout: u64,
mode: ClientPauseMode
) -> CommandResult<'_, T, ()>
Connections control command able to suspend all the Redis clients
for the specified amount of time (in milliseconds). Read more
sourcefn client_reply(&self, mode: ClientReplyMode) -> CommandResult<'_, T, ()>
fn client_reply(&self, mode: ClientReplyMode) -> CommandResult<'_, T, ()>
Sometimes it can be useful for clients to completely disable replies from the Redis server. Read more
sourcefn client_setname<CN>(&self, connection_name: CN) -> CommandResult<'_, T, ()>where
CN: Into<BulkString>,
fn client_setname<CN>(&self, connection_name: CN) -> CommandResult<'_, T, ()>where
CN: Into<BulkString>,
Assigns a name to the current connection. Read more
sourcefn client_tracking(
&self,
status: ClientTrackingStatus,
options: ClientTrackingOptions
) -> CommandResult<'_, T, ()>
fn client_tracking(
&self,
status: ClientTrackingStatus,
options: ClientTrackingOptions
) -> CommandResult<'_, T, ()>
This command enables the tracking feature of the Redis server,
that is used for
server assisted client side caching
. Read moresourcefn client_trackinginfo(&self) -> CommandResult<'_, T, ClientTrackingInfo>
fn client_trackinginfo(&self) -> CommandResult<'_, T, ClientTrackingInfo>
This command enables the tracking feature of the Redis server,
that is used for
server assisted client side caching
. Read moresourcefn client_unblock(
&self,
client_id: i64,
mode: ClientUnblockMode
) -> CommandResult<'_, T, bool>
fn client_unblock(
&self,
client_id: i64,
mode: ClientUnblockMode
) -> CommandResult<'_, T, bool>
This command can unblock, from a different connection,
a client blocked in a blocking operation,
such as for instance
BRPOP
or XREAD
or WAIT
. Read moresourcefn client_unpause(&self) -> CommandResult<'_, T, bool>
fn client_unpause(&self) -> CommandResult<'_, T, bool>
Used to resume command processing for all clients that were
paused by
client_pause
. Read moresourcefn echo<M, R>(&self, message: M) -> CommandResult<'_, T, R>where
M: Into<BulkString>,
R: FromValue,
fn echo<M, R>(&self, message: M) -> CommandResult<'_, T, R>where
M: Into<BulkString>,
R: FromValue,
Returns
message
. Read moresourcefn hello(&self, options: HelloOptions) -> CommandResult<'_, T, HelloResult>
fn hello(&self, options: HelloOptions) -> CommandResult<'_, T, HelloResult>
Switch to a different protocol,
optionally authenticating and setting the connection’s name,
or provide a contextual client report. Read more
sourcefn ping<R>(&self, options: PingOptions) -> CommandResult<'_, T, R>where
R: FromValue,
fn ping<R>(&self, options: PingOptions) -> CommandResult<'_, T, R>where
R: FromValue,
Returns PONG if no argument is provided, otherwise return a copy of the argument as a bulk. Read more
sourcefn quit(&self) -> CommandResult<'_, T, ()>
fn quit(&self) -> CommandResult<'_, T, ()>
Ask the server to close the connection. Read more
sourcefn reset(&self) -> CommandResult<'_, T, ()>
fn reset(&self) -> CommandResult<'_, T, ()>
This command performs a full reset of the connection’s server-side context,
mimicking the effect of disconnecting and reconnecting again. Read more
sourceimpl GenericCommands<ClientResult> for Client
impl GenericCommands<ClientResult> for Client
sourcefn copy<S, D>(
&self,
source: S,
destination: D,
destination_db: Option<usize>,
replace: bool
) -> CommandResult<'_, T, bool>where
S: Into<BulkString>,
D: Into<BulkString>,
fn copy<S, D>(
&self,
source: S,
destination: D,
destination_db: Option<usize>,
replace: bool
) -> CommandResult<'_, T, bool>where
S: Into<BulkString>,
D: Into<BulkString>,
This command copies the value stored at the source key to the destination key. Read more
sourcefn del<K, C>(&self, keys: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn del<K, C>(&self, keys: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
Removes the specified keys. A key is ignored if it does not exist. Read more
sourcefn dump<K>(&self, key: K) -> CommandResult<'_, T, DumpResult>where
K: Into<BulkString>,
fn dump<K>(&self, key: K) -> CommandResult<'_, T, DumpResult>where
K: Into<BulkString>,
Serialize the value stored at key in a Redis-specific format and return it to the user. Read more
sourcefn exists<K, C>(&self, keys: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn exists<K, C>(&self, keys: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
Returns if keys exist. Read more
sourcefn expire<K>(
&self,
key: K,
seconds: u64,
option: ExpireOption
) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
fn expire<K>(
&self,
key: K,
seconds: u64,
option: ExpireOption
) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
Set a timeout on key in seconds Read more
sourcefn expireat<K>(
&self,
key: K,
unix_time_seconds: u64,
option: ExpireOption
) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
fn expireat<K>(
&self,
key: K,
unix_time_seconds: u64,
option: ExpireOption
) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
EXPIREAT has the same effect and semantic as EXPIRE,
but instead of specifying the number of seconds representing the TTL (time to live),
it takes an absolute Unix timestamp (seconds since January 1, 1970) Read more
sourcefn expiretime<K>(&self, key: K) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
fn expiretime<K>(&self, key: K) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
Returns the absolute Unix timestamp (since January 1, 1970) in seconds at which the given key will expire. Read more
sourcefn keys<P, K, A>(&self, pattern: P) -> CommandResult<'_, T, A>where
P: Into<BulkString>,
K: FromValue,
A: FromSingleValueArray<K>,
fn keys<P, K, A>(&self, pattern: P) -> CommandResult<'_, T, A>where
P: Into<BulkString>,
K: FromValue,
A: FromSingleValueArray<K>,
Returns all keys matching pattern. Read more
sourcefn migrate<H, K>(
&self,
host: H,
port: u16,
key: K,
destination_db: usize,
timeout: u64,
options: MigrateOptions
) -> CommandResult<'_, T, bool>where
H: Into<BulkString>,
K: Into<BulkString>,
fn migrate<H, K>(
&self,
host: H,
port: u16,
key: K,
destination_db: usize,
timeout: u64,
options: MigrateOptions
) -> CommandResult<'_, T, bool>where
H: Into<BulkString>,
K: Into<BulkString>,
Atomically transfer a key or a collection of keys from a source Redis instance to a destination Redis instance. Read more
sourcefn move_<K>(&self, key: K, db: usize) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
fn move_<K>(&self, key: K, db: usize) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
Move key from the currently selected database to the specified destination database. Read more
sourcefn object_encoding<K, E>(&self, key: K) -> CommandResult<'_, T, E>where
K: Into<BulkString>,
E: FromValue,
fn object_encoding<K, E>(&self, key: K) -> CommandResult<'_, T, E>where
K: Into<BulkString>,
E: FromValue,
Returns the internal encoding for the Redis object stored at
key
Read moresourcefn object_freq<K>(&self, key: K) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
fn object_freq<K>(&self, key: K) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
This command returns the logarithmic access frequency counter of a Redis object stored at
key
. Read moresourcefn object_idle_time<K>(&self, key: K) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
fn object_idle_time<K>(&self, key: K) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
This command returns the time in seconds since the last access to the value stored at
key
. Read moresourcefn object_refcount<K>(&self, key: K) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
fn object_refcount<K>(&self, key: K) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
This command returns the reference count of the stored at
key
. Read moresourcefn persist<K>(&self, key: K) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
fn persist<K>(&self, key: K) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
Remove the existing timeout on key,
turning the key from volatile (a key with an expire set)
to persistent (a key that will never expire as no timeout is associated). Read more
sourcefn pexpire<K>(
&self,
key: K,
milliseconds: u64,
option: ExpireOption
) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
fn pexpire<K>(
&self,
key: K,
milliseconds: u64,
option: ExpireOption
) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
This command works exactly like EXPIRE but the time to live of the key is specified in milliseconds instead of seconds. Read more
sourcefn pexpireat<K>(
&self,
key: K,
unix_time_milliseconds: u64,
option: ExpireOption
) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
fn pexpireat<K>(
&self,
key: K,
unix_time_milliseconds: u64,
option: ExpireOption
) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
PEXPIREAT has the same effect and semantic as EXPIREAT,
but the Unix time at which the key will expire is specified in milliseconds instead of seconds. Read more
sourcefn pexpiretime<K>(&self, key: K) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
fn pexpiretime<K>(&self, key: K) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
PEXPIRETIME has the same semantic as EXPIRETIME,
but returns the absolute Unix expiration timestamp in milliseconds instead of seconds. Read more
sourcefn pttl<K>(&self, key: K) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
fn pttl<K>(&self, key: K) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
Returns the remaining time to live of a key that has a timeout. Read more
sourcefn randomkey<R>(&self) -> CommandResult<'_, T, R>where
R: FromValue,
fn randomkey<R>(&self) -> CommandResult<'_, T, R>where
R: FromValue,
Return a random key from the currently selected database. Read more
sourcefn rename<K1, K2>(&self, key: K1, new_key: K2) -> CommandResult<'_, T, ()>where
K1: Into<BulkString>,
K2: Into<BulkString>,
fn rename<K1, K2>(&self, key: K1, new_key: K2) -> CommandResult<'_, T, ()>where
K1: Into<BulkString>,
K2: Into<BulkString>,
Renames key to newkey. Read more
sourcefn renamenx<K1, K2>(&self, key: K1, new_key: K2) -> CommandResult<'_, T, bool>where
K1: Into<BulkString>,
K2: Into<BulkString>,
fn renamenx<K1, K2>(&self, key: K1, new_key: K2) -> CommandResult<'_, T, bool>where
K1: Into<BulkString>,
K2: Into<BulkString>,
Renames key to newkey if newkey does not yet exist.
It returns an error when key does not exist. Read more
sourcefn restore<K>(
&self,
key: K,
ttl: u64,
serialized_value: Vec<u8>,
options: RestoreOptions
) -> CommandResult<'_, T, ()>where
K: Into<BulkString>,
fn restore<K>(
&self,
key: K,
ttl: u64,
serialized_value: Vec<u8>,
options: RestoreOptions
) -> CommandResult<'_, T, ()>where
K: Into<BulkString>,
Create a key associated with a value that is obtained by deserializing
the provided serialized value (obtained via DUMP). Read more
sourcefn scan<K, A>(
&self,
cursor: u64,
options: ScanOptions
) -> CommandResult<'_, T, (u64, A)>where
K: FromValue,
A: FromSingleValueArray<K>,
fn scan<K, A>(
&self,
cursor: u64,
options: ScanOptions
) -> CommandResult<'_, T, (u64, A)>where
K: FromValue,
A: FromSingleValueArray<K>,
Iterates the set of keys in the currently selected Redis database. Read more
sourcefn sort<K, M, A>(&self, key: K, options: SortOptions) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
M: FromValue,
A: FromSingleValueArray<M>,
fn sort<K, M, A>(&self, key: K, options: SortOptions) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
M: FromValue,
A: FromSingleValueArray<M>,
Returns the elements contained in the list, set or sorted set at key. Read more
sourcefn sort_and_store<K, D>(
&self,
key: K,
destination: D,
options: SortOptions
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
D: Into<BulkString>,
fn sort_and_store<K, D>(
&self,
key: K,
destination: D,
options: SortOptions
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
D: Into<BulkString>,
Stores the elements contained in the list, set or sorted set at key. Read more
sourcefn sort_readonly<K, M, A>(
&self,
key: K,
options: SortOptions
) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
M: FromValue,
A: FromSingleValueArray<M>,
fn sort_readonly<K, M, A>(
&self,
key: K,
options: SortOptions
) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
M: FromValue,
A: FromSingleValueArray<M>,
Read-only variant of the SORT command. Read more
sourcefn touch<K, KK>(&self, keys: KK) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
fn touch<K, KK>(&self, keys: KK) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
Alters the last access time of a key(s). A key is ignored if it does not exist. Read more
sourcefn ttl<K>(&self, key: K) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
fn ttl<K>(&self, key: K) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
Returns the remaining time to live of a key that has a timeout. Read more
sourcefn type_<K>(&self, key: K) -> CommandResult<'_, T, String>where
K: Into<BulkString>,
fn type_<K>(&self, key: K) -> CommandResult<'_, T, String>where
K: Into<BulkString>,
Returns the string representation of the type of the value stored at key. Read more
sourcefn unlink<K, C>(&self, keys: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn unlink<K, C>(&self, keys: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
This command is very similar to DEL: it removes the specified keys. Read more
sourceimpl GeoCommands<ClientResult> for Client
impl GeoCommands<ClientResult> for Client
sourcefn geoadd<K, M, I>(
&self,
key: K,
condition: GeoAddCondition,
change: bool,
items: I
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
M: Into<BulkString>,
I: ArgsOrCollection<(f64, f64, M)>,
fn geoadd<K, M, I>(
&self,
key: K,
condition: GeoAddCondition,
change: bool,
items: I
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
M: Into<BulkString>,
I: ArgsOrCollection<(f64, f64, M)>,
Adds the specified geospatial items (longitude, latitude, name) to the specified key. Read more
sourcefn geodist<K, M>(
&self,
key: K,
member1: M,
member2: M,
unit: GeoUnit
) -> CommandResult<'_, T, Option<f64>>where
K: Into<BulkString>,
M: Into<BulkString>,
fn geodist<K, M>(
&self,
key: K,
member1: M,
member2: M,
unit: GeoUnit
) -> CommandResult<'_, T, Option<f64>>where
K: Into<BulkString>,
M: Into<BulkString>,
Return the distance between two members in the geospatial index
represented by the sorted set. Read more
sourcefn geohash<K, M, C>(
&self,
key: K,
members: C
) -> CommandResult<'_, T, Vec<String>>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
fn geohash<K, M, C>(
&self,
key: K,
members: C
) -> CommandResult<'_, T, Vec<String>>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
sourcefn geopos<K, M, C>(
&self,
key: K,
members: C
) -> CommandResult<'_, T, Vec<Option<(f64, f64)>>>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
fn geopos<K, M, C>(
&self,
key: K,
members: C
) -> CommandResult<'_, T, Vec<Option<(f64, f64)>>>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
Return the positions (longitude,latitude) of all the specified members
of the geospatial index represented by the sorted set at key. Read more
sourcefn geosearch<K, M1, M2, A>(
&self,
key: K,
from: GeoSearchFrom<M1>,
by: GeoSearchBy,
options: GeoSearchOptions
) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
M1: Into<BulkString>,
M2: FromValue,
A: FromSingleValueArray<GeoSearchResult<M2>>,
fn geosearch<K, M1, M2, A>(
&self,
key: K,
from: GeoSearchFrom<M1>,
by: GeoSearchBy,
options: GeoSearchOptions
) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
M1: Into<BulkString>,
M2: FromValue,
A: FromSingleValueArray<GeoSearchResult<M2>>,
sourcefn geosearchstore<D, S, M>(
&self,
destination: D,
source: S,
from: GeoSearchFrom<M>,
by: GeoSearchBy,
options: GeoSearchStoreOptions
) -> CommandResult<'_, T, usize>where
D: Into<BulkString>,
S: Into<BulkString>,
M: Into<BulkString>,
fn geosearchstore<D, S, M>(
&self,
destination: D,
source: S,
from: GeoSearchFrom<M>,
by: GeoSearchBy,
options: GeoSearchStoreOptions
) -> CommandResult<'_, T, usize>where
D: Into<BulkString>,
S: Into<BulkString>,
M: Into<BulkString>,
sourceimpl HashCommands<ClientResult> for Client
impl HashCommands<ClientResult> for Client
sourcefn hdel<K, F, C>(&self, key: K, fields: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
F: Into<BulkString>,
C: SingleArgOrCollection<F>,
fn hdel<K, F, C>(&self, key: K, fields: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
F: Into<BulkString>,
C: SingleArgOrCollection<F>,
Removes the specified fields from the hash stored at key. Read more
sourcefn hexists<K, F>(&self, key: K, field: F) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
F: Into<BulkString>,
fn hexists<K, F>(&self, key: K, field: F) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
F: Into<BulkString>,
Returns if field is an existing field in the hash stored at key. Read more
sourcefn hget<K, F, V>(&self, key: K, field: F) -> CommandResult<'_, T, V>where
K: Into<BulkString>,
F: Into<BulkString>,
V: FromValue,
fn hget<K, F, V>(&self, key: K, field: F) -> CommandResult<'_, T, V>where
K: Into<BulkString>,
F: Into<BulkString>,
V: FromValue,
Returns the value associated with field in the hash stored at key. Read more
sourcefn hgetall<K, F, V, A>(&self, key: K) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
F: FromValue,
V: FromValue,
A: FromKeyValueValueArray<F, V>,
fn hgetall<K, F, V, A>(&self, key: K) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
F: FromValue,
V: FromValue,
A: FromKeyValueValueArray<F, V>,
Returns all fields and values of the hash stored at key. Read more
sourcefn hincrby<K, F>(
&self,
key: K,
field: F,
increment: i64
) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
F: Into<BulkString>,
fn hincrby<K, F>(
&self,
key: K,
field: F,
increment: i64
) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
F: Into<BulkString>,
Increments the number stored at field in the hash stored at key by increment. Read more
sourcefn hincrbyfloat<K, F>(
&self,
key: K,
field: F,
increment: f64
) -> CommandResult<'_, T, f64>where
K: Into<BulkString>,
F: Into<BulkString>,
fn hincrbyfloat<K, F>(
&self,
key: K,
field: F,
increment: f64
) -> CommandResult<'_, T, f64>where
K: Into<BulkString>,
F: Into<BulkString>,
Increment the specified field of a hash stored at key,
and representing a floating point number, by the specified increment. Read more
sourcefn hkeys<K, F, A>(&self, key: K) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
F: FromValue,
A: FromSingleValueArray<F>,
fn hkeys<K, F, A>(&self, key: K) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
F: FromValue,
A: FromSingleValueArray<F>,
Returns all field names in the hash stored at key. Read more
sourcefn hlen<K>(&self, key: K) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
fn hlen<K>(&self, key: K) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
Returns the number of fields contained in the hash stored at key. Read more
sourcefn hmget<K, F, V, C, A>(&self, key: K, fields: C) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
F: Into<BulkString>,
C: SingleArgOrCollection<F>,
V: FromValue,
A: FromSingleValueArray<V>,
fn hmget<K, F, V, C, A>(&self, key: K, fields: C) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
F: Into<BulkString>,
C: SingleArgOrCollection<F>,
V: FromValue,
A: FromSingleValueArray<V>,
Returns the values associated with the specified fields in the hash stored at key. Read more
sourcefn hrandfield<K, F>(&self, key: K) -> CommandResult<'_, T, F>where
K: Into<BulkString>,
F: FromValue,
fn hrandfield<K, F>(&self, key: K) -> CommandResult<'_, T, F>where
K: Into<BulkString>,
F: FromValue,
return random fields from the hash value stored at key. Read more
sourcefn hrandfields<K, F, A>(&self, key: K, count: isize) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
F: FromValue,
A: FromSingleValueArray<F>,
fn hrandfields<K, F, A>(&self, key: K, count: isize) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
F: FromValue,
A: FromSingleValueArray<F>,
return random fields from the hash value stored at key. Read more
sourcefn hrandfields_with_values<K, F, V, A>(
&self,
key: K,
count: isize
) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
F: FromValue,
V: FromValue,
A: FromKeyValueValueArray<F, V>,
fn hrandfields_with_values<K, F, V, A>(
&self,
key: K,
count: isize
) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
F: FromValue,
V: FromValue,
A: FromKeyValueValueArray<F, V>,
return random fields from the hash value stored at key. Read more
sourcefn hscan<K, F, V>(
&self,
key: K,
cursor: u64,
options: HScanOptions
) -> CommandResult<'_, T, (u64, Vec<(F, V)>)>where
K: Into<BulkString>,
F: FromValue,
V: FromValue,
fn hscan<K, F, V>(
&self,
key: K,
cursor: u64,
options: HScanOptions
) -> CommandResult<'_, T, (u64, Vec<(F, V)>)>where
K: Into<BulkString>,
F: FromValue,
V: FromValue,
Iterates fields of Hash types and their associated values. Read more
sourcefn hset<K, F, V, I>(&self, key: K, items: I) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
F: Into<BulkString>,
V: Into<BulkString>,
I: KeyValueArgOrCollection<F, V>,
fn hset<K, F, V, I>(&self, key: K, items: I) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
F: Into<BulkString>,
V: Into<BulkString>,
I: KeyValueArgOrCollection<F, V>,
Sets field in the hash stored at key to value. Read more
sourcefn hsetnx<K, F, V>(&self, key: K, field: F, value: V) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
F: Into<BulkString>,
V: Into<BulkString>,
fn hsetnx<K, F, V>(&self, key: K, field: F, value: V) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
F: Into<BulkString>,
V: Into<BulkString>,
Sets field in the hash stored at key to value, only if field does not yet exist. Read more
sourcefn hstrlen<K, F>(&self, key: K, field: F) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
F: Into<BulkString>,
fn hstrlen<K, F>(&self, key: K, field: F) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
F: Into<BulkString>,
Returns the string length of the value associated with field in the hash stored at key. Read more
sourcefn hvals<K, V, A>(&self, key: K) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
V: FromValue,
A: FromSingleValueArray<V>,
fn hvals<K, V, A>(&self, key: K) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
V: FromValue,
A: FromSingleValueArray<V>,
list of values in the hash, or an empty list when key does not exist. Read more
sourceimpl HyperLogLogCommands<ClientResult> for Client
impl HyperLogLogCommands<ClientResult> for Client
sourcefn pfadd<K, E, EE>(&self, key: K, elements: EE) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
E: Into<BulkString>,
EE: SingleArgOrCollection<E>,
fn pfadd<K, E, EE>(&self, key: K, elements: EE) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
E: Into<BulkString>,
EE: SingleArgOrCollection<E>,
Adds the specified elements to the specified HyperLogLog. Read more
sourcefn pfcount<K, KK>(&self, keys: KK) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
fn pfcount<K, KK>(&self, keys: KK) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
Return the approximated cardinality of the set(s)
observed by the HyperLogLog at key(s). Read more
sourcefn pfmerge<D, S, SS>(
&self,
dest_key: D,
source_keys: SS
) -> CommandResult<'_, T, ()>where
D: Into<BulkString>,
S: Into<BulkString>,
SS: SingleArgOrCollection<S>,
fn pfmerge<D, S, SS>(
&self,
dest_key: D,
source_keys: SS
) -> CommandResult<'_, T, ()>where
D: Into<BulkString>,
S: Into<BulkString>,
SS: SingleArgOrCollection<S>,
Merge N different HyperLogLogs into a single one. Read more
sourceimpl ListCommands<ClientResult> for Client
impl ListCommands<ClientResult> for Client
sourcefn blmove<S, D, E>(
&self,
source: S,
destination: D,
where_from: LMoveWhere,
where_to: LMoveWhere,
timeout: f64
) -> CommandResult<'_, T, E>where
S: Into<BulkString>,
D: Into<BulkString>,
E: FromValue,
fn blmove<S, D, E>(
&self,
source: S,
destination: D,
where_from: LMoveWhere,
where_to: LMoveWhere,
timeout: f64
) -> CommandResult<'_, T, E>where
S: Into<BulkString>,
D: Into<BulkString>,
E: FromValue,
sourcefn blmpop<K, E, C>(
&self,
timeout: f64,
keys: C,
where_: LMoveWhere,
count: usize
) -> CommandResult<'_, T, Option<(String, Vec<E>)>>where
K: Into<BulkString>,
E: FromValue,
C: SingleArgOrCollection<K>,
fn blmpop<K, E, C>(
&self,
timeout: f64,
keys: C,
where_: LMoveWhere,
count: usize
) -> CommandResult<'_, T, Option<(String, Vec<E>)>>where
K: Into<BulkString>,
E: FromValue,
C: SingleArgOrCollection<K>,
sourcefn blpop<K, KK, K1, V>(
&self,
keys: KK,
timeout: f64
) -> CommandResult<'_, T, Option<(K1, V)>>where
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
K1: FromValue,
V: FromValue,
fn blpop<K, KK, K1, V>(
&self,
keys: KK,
timeout: f64
) -> CommandResult<'_, T, Option<(K1, V)>>where
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
K1: FromValue,
V: FromValue,
This command is a blocking list pop primitive. Read more
sourcefn brpop<K, KK, K1, V>(
&self,
keys: KK,
timeout: f64
) -> CommandResult<'_, T, Option<(K1, V)>>where
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
K1: FromValue,
V: FromValue,
fn brpop<K, KK, K1, V>(
&self,
keys: KK,
timeout: f64
) -> CommandResult<'_, T, Option<(K1, V)>>where
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
K1: FromValue,
V: FromValue,
This command is a blocking list pop primitive. Read more
sourcefn lindex<K, E>(&self, key: K, index: isize) -> CommandResult<'_, T, E>where
K: Into<BulkString>,
E: FromValue,
fn lindex<K, E>(&self, key: K, index: isize) -> CommandResult<'_, T, E>where
K: Into<BulkString>,
E: FromValue,
Returns the element at index index in the list stored at key. Read more
sourcefn linsert<K, E>(
&self,
key: K,
where_: LInsertWhere,
pivot: E,
element: E
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
fn linsert<K, E>(
&self,
key: K,
where_: LInsertWhere,
pivot: E,
element: E
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
Inserts element in the list stored at key either before or after the reference value pivot. Read more
sourcefn llen<K>(&self, key: K) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
fn llen<K>(&self, key: K) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
Inserts element in the list stored at key either before or after the reference value pivot. Read more
sourcefn lmove<S, D, E>(
&self,
source: S,
destination: D,
where_from: LMoveWhere,
where_to: LMoveWhere
) -> CommandResult<'_, T, E>where
S: Into<BulkString>,
D: Into<BulkString>,
E: FromValue,
fn lmove<S, D, E>(
&self,
source: S,
destination: D,
where_from: LMoveWhere,
where_to: LMoveWhere
) -> CommandResult<'_, T, E>where
S: Into<BulkString>,
D: Into<BulkString>,
E: FromValue,
Atomically returns and removes the first/last element (head/tail depending on the wherefrom argument)
of the list stored at source, and pushes the element at the first/last element
(head/tail depending on the whereto argument) of the list stored at destination. Read more
sourcefn lmpop<K, E, C>(
&self,
keys: C,
where_: LMoveWhere,
count: usize
) -> CommandResult<'_, T, (String, Vec<E>)>where
K: Into<BulkString>,
E: FromValue,
C: SingleArgOrCollection<K>,
fn lmpop<K, E, C>(
&self,
keys: C,
where_: LMoveWhere,
count: usize
) -> CommandResult<'_, T, (String, Vec<E>)>where
K: Into<BulkString>,
E: FromValue,
C: SingleArgOrCollection<K>,
Pops one or more elements from the first non-empty list key from the list of provided key names. Read more
sourcefn lpop<K, E, A>(&self, key: K, count: usize) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
E: FromValue,
A: FromSingleValueArray<E>,
fn lpop<K, E, A>(&self, key: K, count: usize) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
E: FromValue,
A: FromSingleValueArray<E>,
Removes and returns the first elements of the list stored at key. Read more
sourcefn lpos<K, E>(
&self,
key: K,
element: E,
rank: Option<usize>,
max_len: Option<usize>
) -> CommandResult<'_, T, Option<usize>>where
K: Into<BulkString>,
E: Into<BulkString>,
fn lpos<K, E>(
&self,
key: K,
element: E,
rank: Option<usize>,
max_len: Option<usize>
) -> CommandResult<'_, T, Option<usize>>where
K: Into<BulkString>,
E: Into<BulkString>,
Returns the index of matching elements inside a Redis list. Read more
sourcefn lpos_with_count<K, E, A>(
&self,
key: K,
element: E,
num_matches: usize,
rank: Option<usize>,
max_len: Option<usize>
) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
E: Into<BulkString>,
A: FromSingleValueArray<usize>,
fn lpos_with_count<K, E, A>(
&self,
key: K,
element: E,
num_matches: usize,
rank: Option<usize>,
max_len: Option<usize>
) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
E: Into<BulkString>,
A: FromSingleValueArray<usize>,
Returns the index of matching elements inside a Redis list. Read more
sourcefn lpush<K, E, C>(&self, key: K, elements: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
C: SingleArgOrCollection<E>,
fn lpush<K, E, C>(&self, key: K, elements: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
C: SingleArgOrCollection<E>,
Insert all the specified values at the head of the list stored at key Read more
sourcefn lpushx<K, E, C>(&self, key: K, elements: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
C: SingleArgOrCollection<E>,
fn lpushx<K, E, C>(&self, key: K, elements: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
C: SingleArgOrCollection<E>,
Inserts specified values at the head of the list stored at key,
only if key already exists and holds a list. Read more
sourcefn lrange<K, E, A>(
&self,
key: K,
start: isize,
stop: isize
) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
E: FromValue,
A: FromSingleValueArray<E>,
fn lrange<K, E, A>(
&self,
key: K,
start: isize,
stop: isize
) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
E: FromValue,
A: FromSingleValueArray<E>,
Returns the specified elements of the list stored at key. Read more
sourcefn lrem<K, E>(
&self,
key: K,
count: isize,
element: E
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
fn lrem<K, E>(
&self,
key: K,
count: isize,
element: E
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
Removes the first count occurrences of elements equal to element from the list stored at key. Read more
sourcefn lset<K, E>(&self, key: K, index: isize, element: E) -> CommandResult<'_, T, ()>where
K: Into<BulkString>,
E: Into<BulkString>,
fn lset<K, E>(&self, key: K, index: isize, element: E) -> CommandResult<'_, T, ()>where
K: Into<BulkString>,
E: Into<BulkString>,
Sets the list element at index to element. Read more
sourcefn ltrim<K>(&self, key: K, start: isize, stop: isize) -> CommandResult<'_, T, ()>where
K: Into<BulkString>,
fn ltrim<K>(&self, key: K, start: isize, stop: isize) -> CommandResult<'_, T, ()>where
K: Into<BulkString>,
Trim an existing list so that it will contain only the specified range of elements specified. Read more
sourcefn rpop<K, E, C>(&self, key: K, count: usize) -> CommandResult<'_, T, C>where
K: Into<BulkString>,
E: FromValue,
C: FromSingleValueArray<E>,
fn rpop<K, E, C>(&self, key: K, count: usize) -> CommandResult<'_, T, C>where
K: Into<BulkString>,
E: FromValue,
C: FromSingleValueArray<E>,
Removes and returns the first elements of the list stored at key. Read more
sourcefn rpush<K, E, C>(&self, key: K, elements: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
C: SingleArgOrCollection<E>,
fn rpush<K, E, C>(&self, key: K, elements: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
C: SingleArgOrCollection<E>,
Insert all the specified values at the tail of the list stored at key Read more
sourcefn rpushx<K, E, C>(&self, key: K, elements: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
C: SingleArgOrCollection<E>,
fn rpushx<K, E, C>(&self, key: K, elements: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
E: Into<BulkString>,
C: SingleArgOrCollection<E>,
Inserts specified values at the tail of the list stored at key,
only if key already exists and holds a list. Read more
sourceimpl PrepareCommand<ClientResult> for Client
impl PrepareCommand<ClientResult> for Client
fn prepare_command<R: FromValue>(
&self,
command: Command
) -> CommandResult<'_, ClientResult, R>
sourceimpl PubSubCommands<ClientResult> for Client
impl PubSubCommands<ClientResult> for Client
sourcefn subscribe<'a, C, CC>(&'a self, channels: CC) -> Future<'a, PubSubStream>where
C: Into<BulkString> + Send + 'a,
CC: SingleArgOrCollection<C>,
fn subscribe<'a, C, CC>(&'a self, channels: CC) -> Future<'a, PubSubStream>where
C: Into<BulkString> + Send + 'a,
CC: SingleArgOrCollection<C>,
Subscribes the client to the specified channels. Read more
sourcefn psubscribe<'a, P, PP>(&'a self, patterns: PP) -> Future<'a, PubSubStream>where
P: Into<BulkString> + Send + 'a,
PP: SingleArgOrCollection<P>,
fn psubscribe<'a, P, PP>(&'a self, patterns: PP) -> Future<'a, PubSubStream>where
P: Into<BulkString> + Send + 'a,
PP: SingleArgOrCollection<P>,
Subscribes the client to the given patterns. Read more
sourcefn publish<C, M>(&self, channel: C, message: M) -> CommandResult<'_, T, usize>where
C: Into<BulkString>,
M: Into<BulkString>,
fn publish<C, M>(&self, channel: C, message: M) -> CommandResult<'_, T, usize>where
C: Into<BulkString>,
M: Into<BulkString>,
Posts a message to the given channel. Read more
sourcefn pub_sub_channels<C, CC>(
&self,
options: PubSubChannelsOptions
) -> CommandResult<'_, T, CC>where
C: FromValue,
CC: FromSingleValueArray<C>,
fn pub_sub_channels<C, CC>(
&self,
options: PubSubChannelsOptions
) -> CommandResult<'_, T, CC>where
C: FromValue,
CC: FromSingleValueArray<C>,
Lists the currently active channels. Read more
sourcefn pub_sub_numpat(&self) -> CommandResult<'_, T, usize>
fn pub_sub_numpat(&self) -> CommandResult<'_, T, usize>
Returns the number of unique patterns that are subscribed to by clients
(that are performed using the PSUBSCRIBE command). Read more
sourcefn pub_sub_numsub<C, CC, R, RR>(&self, channels: CC) -> CommandResult<'_, T, RR>where
C: Into<BulkString>,
CC: SingleArgOrCollection<C>,
R: FromValue,
RR: FromKeyValueValueArray<R, usize>,
fn pub_sub_numsub<C, CC, R, RR>(&self, channels: CC) -> CommandResult<'_, T, RR>where
C: Into<BulkString>,
CC: SingleArgOrCollection<C>,
R: FromValue,
RR: FromKeyValueValueArray<R, usize>,
Returns the number of subscribers (exclusive of clients subscribed to patterns)
for the specified channels. Read more
sourceimpl ScriptingCommands<ClientResult> for Client
impl ScriptingCommands<ClientResult> for Client
sourcefn eval<R>(&self, builder: CallBuilder) -> CommandResult<'_, T, R>where
R: FromValue,
fn eval<R>(&self, builder: CallBuilder) -> CommandResult<'_, T, R>where
R: FromValue,
Invoke the execution of a server-side Lua script. Read more
sourcefn eval_readonly<R>(&self, builder: CallBuilder) -> CommandResult<'_, T, R>where
R: FromValue,
fn eval_readonly<R>(&self, builder: CallBuilder) -> CommandResult<'_, T, R>where
R: FromValue,
sourcefn evalsha<R>(&self, builder: CallBuilder) -> CommandResult<'_, T, R>where
R: FromValue,
fn evalsha<R>(&self, builder: CallBuilder) -> CommandResult<'_, T, R>where
R: FromValue,
Evaluate a script from the server’s cache by its SHA1 digest. Read more
sourcefn evalsha_readonly<R>(&self, builder: CallBuilder) -> CommandResult<'_, T, R>where
R: FromValue,
fn evalsha_readonly<R>(&self, builder: CallBuilder) -> CommandResult<'_, T, R>where
R: FromValue,
sourcefn fcall<R>(&self, builder: CallBuilder) -> CommandResult<'_, T, R>where
R: FromValue,
fn fcall<R>(&self, builder: CallBuilder) -> CommandResult<'_, T, R>where
R: FromValue,
Invoke a function. Read more
sourcefn fcall_readonly<R>(&self, builder: CallBuilder) -> CommandResult<'_, T, R>where
R: FromValue,
fn fcall_readonly<R>(&self, builder: CallBuilder) -> CommandResult<'_, T, R>where
R: FromValue,
Invoke a function. Read more
sourcefn function_delete<L>(&self, library_name: L) -> CommandResult<'_, T, ()>where
L: Into<BulkString>,
fn function_delete<L>(&self, library_name: L) -> CommandResult<'_, T, ()>where
L: Into<BulkString>,
Delete a library and all its functions. Read more
sourcefn function_dump<P>(&self) -> CommandResult<'_, T, P>where
P: FromValue,
fn function_dump<P>(&self) -> CommandResult<'_, T, P>where
P: FromValue,
Return the serialized payload of loaded libraries.
You can restore the serialized payload later with the
function_restore
command. Read moresourcefn function_flush(&self, flushing_mode: FlushingMode) -> CommandResult<'_, T, ()>
fn function_flush(&self, flushing_mode: FlushingMode) -> CommandResult<'_, T, ()>
Deletes all the libraries. Read more
sourcefn function_kill(&self) -> CommandResult<'_, T, ()>
fn function_kill(&self) -> CommandResult<'_, T, ()>
Kill a function that is currently executing. Read more
sourcefn function_list(
&self,
options: FunctionListOptions
) -> CommandResult<'_, T, Vec<LibraryInfo>>
fn function_list(
&self,
options: FunctionListOptions
) -> CommandResult<'_, T, Vec<LibraryInfo>>
Return information about the functions and libraries. Read more
sourcefn function_load<F, L>(
&self,
replace: bool,
function_code: F
) -> CommandResult<'_, T, L>where
F: Into<BulkString>,
L: FromValue,
fn function_load<F, L>(
&self,
replace: bool,
function_code: F
) -> CommandResult<'_, T, L>where
F: Into<BulkString>,
L: FromValue,
Load a library to Redis. Read more
sourcefn function_restore<P>(
&self,
serialized_payload: P,
policy: FunctionRestorePolicy
) -> CommandResult<'_, T, ()>where
P: Into<BulkString>,
fn function_restore<P>(
&self,
serialized_payload: P,
policy: FunctionRestorePolicy
) -> CommandResult<'_, T, ()>where
P: Into<BulkString>,
Restore libraries from the serialized payload. Read more
sourcefn function_stats(&self) -> CommandResult<'_, T, FunctionStats>
fn function_stats(&self) -> CommandResult<'_, T, FunctionStats>
Return information about the function that’s currently running and information about the available execution engines. Read more
sourcefn script_debug(&self, debug_mode: ScriptDebugMode) -> CommandResult<'_, T, ()>
fn script_debug(&self, debug_mode: ScriptDebugMode) -> CommandResult<'_, T, ()>
Set the debug mode for subsequent scripts executed with EVAL. Read more
sourcefn script_exists<S, C>(&self, sha1s: C) -> CommandResult<'_, T, Vec<bool>>where
S: Into<BulkString>,
C: SingleArgOrCollection<S>,
fn script_exists<S, C>(&self, sha1s: C) -> CommandResult<'_, T, Vec<bool>>where
S: Into<BulkString>,
C: SingleArgOrCollection<S>,
Returns information about the existence of the scripts in the script cache. Read more
sourcefn script_flush(&self, flushing_mode: FlushingMode) -> CommandResult<'_, T, ()>
fn script_flush(&self, flushing_mode: FlushingMode) -> CommandResult<'_, T, ()>
Flush the Lua scripts cache. Read more
sourcefn script_kill(&self) -> CommandResult<'_, T, ()>
fn script_kill(&self) -> CommandResult<'_, T, ()>
Kills the currently executing EVAL script,
assuming no write operation was yet performed by the script. Read more
sourcefn script_load<S, V>(&self, script: S) -> CommandResult<'_, T, V>where
S: Into<BulkString>,
V: FromValue,
fn script_load<S, V>(&self, script: S) -> CommandResult<'_, T, V>where
S: Into<BulkString>,
V: FromValue,
Load a script into the scripts cache, without executing it. Read more
sourceimpl SentinelCommands<ClientResult> for Client
impl SentinelCommands<ClientResult> for Client
sourcefn sentinel_get_master_addr_by_name<N>(
&self,
master_name: N
) -> CommandResult<'_, T, Option<(String, u16)>>where
N: Into<BulkString>,
fn sentinel_get_master_addr_by_name<N>(
&self,
master_name: N
) -> CommandResult<'_, T, Option<(String, u16)>>where
N: Into<BulkString>,
Return the ip and port number of the master with that name. Read more
sourcefn sentinel_failover<N>(&self, master_name: N) -> CommandResult<'_, T, ()>where
N: Into<BulkString>,
fn sentinel_failover<N>(&self, master_name: N) -> CommandResult<'_, T, ()>where
N: Into<BulkString>,
Force a failover as if the master was not reachable,
and without asking for agreement to other Sentinels
(however a new version of the configuration will be published
so that the other Sentinels will update their configurations). Read more
sourceimpl ServerCommands<ClientResult> for Client
impl ServerCommands<ClientResult> for Client
sourcefn monitor(&self) -> Future<'_, MonitorStream>
fn monitor(&self) -> Future<'_, MonitorStream>
Debugging command that streams back every command processed by the Redis server. Read more
sourcefn acl_cat<C, CC>(&self, options: AclCatOptions) -> CommandResult<'_, T, CC>where
C: FromValue,
CC: FromSingleValueArray<C>,
fn acl_cat<C, CC>(&self, options: AclCatOptions) -> CommandResult<'_, T, CC>where
C: FromValue,
CC: FromSingleValueArray<C>,
The command shows the available ACL categories if called without arguments.
If a category name is given, the command shows all the Redis commands in the specified category. Read more
sourcefn acl_deluser<U, UU>(&self, usernames: UU) -> CommandResult<'_, T, usize>where
U: Into<BulkString>,
UU: SingleArgOrCollection<U>,
fn acl_deluser<U, UU>(&self, usernames: UU) -> CommandResult<'_, T, usize>where
U: Into<BulkString>,
UU: SingleArgOrCollection<U>,
Delete all the specified ACL users and terminate all
the connections that are authenticated with such users. Read more
sourcefn acl_dryrun<U, C, R>(
&self,
username: U,
command: C,
options: AclDryRunOptions
) -> CommandResult<'_, T, R>where
U: Into<BulkString>,
C: Into<BulkString>,
R: FromValue,
fn acl_dryrun<U, C, R>(
&self,
username: U,
command: C,
options: AclDryRunOptions
) -> CommandResult<'_, T, R>where
U: Into<BulkString>,
C: Into<BulkString>,
R: FromValue,
Simulate the execution of a given command by a given user. Read more
sourcefn acl_genpass<R: FromValue>(
&self,
options: AclGenPassOptions
) -> CommandResult<'_, T, R>
fn acl_genpass<R: FromValue>(
&self,
options: AclGenPassOptions
) -> CommandResult<'_, T, R>
Generates a password starting from /dev/urandom if available,
otherwise (in systems without /dev/urandom) it uses a weaker
system that is likely still better than picking a weak password by hand. Read more
sourcefn acl_getuser<U, RR>(&self, username: U) -> CommandResult<'_, T, RR>where
U: Into<BulkString>,
RR: FromKeyValueValueArray<String, Value>,
fn acl_getuser<U, RR>(&self, username: U) -> CommandResult<'_, T, RR>where
U: Into<BulkString>,
RR: FromKeyValueValueArray<String, Value>,
The command returns all the rules defined for an existing ACL user. Read more
sourcefn acl_list(&self) -> CommandResult<'_, T, Vec<String>>
fn acl_list(&self) -> CommandResult<'_, T, Vec<String>>
The command shows the currently active ACL rules in the Redis server. Read more
sourcefn acl_load(&self) -> CommandResult<'_, T, ()>
fn acl_load(&self) -> CommandResult<'_, T, ()>
When Redis is configured to use an ACL file (with the aclfile configuration option),
this command will reload the ACLs from the file, replacing all the current ACL rules
with the ones defined in the file. Read more
sourcefn acl_log<EE>(&self, options: AclLogOptions) -> CommandResult<'_, T, Vec<EE>>where
EE: FromKeyValueValueArray<String, Value>,
fn acl_log<EE>(&self, options: AclLogOptions) -> CommandResult<'_, T, Vec<EE>>where
EE: FromKeyValueValueArray<String, Value>,
The command shows a list of recent ACL security events Read more
sourcefn acl_save(&self) -> CommandResult<'_, T, ()>
fn acl_save(&self) -> CommandResult<'_, T, ()>
When Redis is configured to use an ACL file (with the aclfile configuration option),
this command will save the currently defined ACLs from the server memory to the ACL file. Read more
sourcefn acl_setuser<U, R, RR>(
&self,
username: U,
rules: RR
) -> CommandResult<'_, T, ()>where
U: Into<BulkString>,
R: Into<BulkString>,
RR: SingleArgOrCollection<R>,
fn acl_setuser<U, R, RR>(
&self,
username: U,
rules: RR
) -> CommandResult<'_, T, ()>where
U: Into<BulkString>,
R: Into<BulkString>,
RR: SingleArgOrCollection<R>,
Create an ACL user with the specified rules or modify the rules of an existing user. Read more
sourcefn acl_users<U, UU>(&self) -> CommandResult<'_, T, UU>where
U: FromValue,
UU: FromSingleValueArray<U>,
fn acl_users<U, UU>(&self) -> CommandResult<'_, T, UU>where
U: FromValue,
UU: FromSingleValueArray<U>,
The command shows a list of all the usernames of the currently configured users in the Redis ACL system. Read more
sourcefn acl_whoami<U: FromValue>(&self) -> CommandResult<'_, T, U>
fn acl_whoami<U: FromValue>(&self) -> CommandResult<'_, T, U>
Return the username the current connection is authenticated with. Read more
sourcefn command(&self) -> CommandResult<'_, T, Vec<CommandInfo>>
fn command(&self) -> CommandResult<'_, T, Vec<CommandInfo>>
Return an array with details about every Redis command. Read more
sourcefn command_count(&self) -> CommandResult<'_, T, usize>
fn command_count(&self) -> CommandResult<'_, T, usize>
Number of total commands in this Redis server. Read more
sourcefn command_docs<N, NN, DD>(&self, command_names: NN) -> CommandResult<'_, T, DD>where
N: Into<BulkString>,
NN: SingleArgOrCollection<N>,
DD: FromKeyValueValueArray<String, CommandDoc>,
fn command_docs<N, NN, DD>(&self, command_names: NN) -> CommandResult<'_, T, DD>where
N: Into<BulkString>,
NN: SingleArgOrCollection<N>,
DD: FromKeyValueValueArray<String, CommandDoc>,
Number of total commands in this Redis server. Read more
sourcefn command_getkeys<A, AA, KK>(&self, args: AA) -> CommandResult<'_, T, KK>where
A: Into<BulkString>,
AA: SingleArgOrCollection<A>,
KK: FromSingleValueArray<String>,
fn command_getkeys<A, AA, KK>(&self, args: AA) -> CommandResult<'_, T, KK>where
A: Into<BulkString>,
AA: SingleArgOrCollection<A>,
KK: FromSingleValueArray<String>,
A helper command to let you find the keys from a full Redis command. Read more
sourcefn command_getkeysandflags<A, AA, KK>(
&self,
args: AA
) -> CommandResult<'_, T, KK>where
A: Into<BulkString>,
AA: SingleArgOrCollection<A>,
KK: FromKeyValueValueArray<String, Vec<String>>,
fn command_getkeysandflags<A, AA, KK>(
&self,
args: AA
) -> CommandResult<'_, T, KK>where
A: Into<BulkString>,
AA: SingleArgOrCollection<A>,
KK: FromKeyValueValueArray<String, Vec<String>>,
A helper command to let you find the keys from a full Redis command together with flags indicating what each key is used for. Read more
sourcefn command_info<N, NN>(
&self,
command_names: NN
) -> CommandResult<'_, T, Vec<CommandInfo>>where
N: Into<BulkString>,
NN: SingleArgOrCollection<N>,
fn command_info<N, NN>(
&self,
command_names: NN
) -> CommandResult<'_, T, Vec<CommandInfo>>where
N: Into<BulkString>,
NN: SingleArgOrCollection<N>,
Return an array with details about multiple Redis command. Read more
sourcefn command_list<CC>(
&self,
options: CommandListOptions
) -> CommandResult<'_, T, CC>where
CC: FromSingleValueArray<String>,
fn command_list<CC>(
&self,
options: CommandListOptions
) -> CommandResult<'_, T, CC>where
CC: FromSingleValueArray<String>,
Return an array of the server’s command names based on optional filters Read more
sourcefn config_get<P, PP, V, VV>(&self, params: PP) -> CommandResult<'_, T, VV>where
P: Into<BulkString>,
PP: SingleArgOrCollection<P>,
V: FromValue,
VV: FromKeyValueValueArray<String, V>,
fn config_get<P, PP, V, VV>(&self, params: PP) -> CommandResult<'_, T, VV>where
P: Into<BulkString>,
PP: SingleArgOrCollection<P>,
V: FromValue,
VV: FromKeyValueValueArray<String, V>,
Used to read the configuration parameters of a running Redis server. Read more
sourcefn config_resetstat(&self) -> CommandResult<'_, T, ()>
fn config_resetstat(&self) -> CommandResult<'_, T, ()>
sourcefn config_rewrite(&self) -> CommandResult<'_, T, ()>
fn config_rewrite(&self) -> CommandResult<'_, T, ()>
Rewrites the redis.conf file the server was started with,
applying the minimal changes needed to make it reflect the configuration currently used by the server,
which may be different compared to the original one because of the use of the
config_set
command. Read moresourcefn config_set<P, V, C>(&self, configs: C) -> CommandResult<'_, T, ()>where
P: Into<BulkString>,
V: Into<BulkString>,
C: KeyValueArgOrCollection<P, V>,
fn config_set<P, V, C>(&self, configs: C) -> CommandResult<'_, T, ()>where
P: Into<BulkString>,
V: Into<BulkString>,
C: KeyValueArgOrCollection<P, V>,
Used in order to reconfigure the server at run time without the need to restart Redis. Read more
sourcefn dbsize(&self) -> CommandResult<'_, T, usize>
fn dbsize(&self) -> CommandResult<'_, T, usize>
Return the number of keys in the currently-selected database. Read more
sourcefn failover(&self, options: FailOverOptions) -> CommandResult<'_, T, ()>
fn failover(&self, options: FailOverOptions) -> CommandResult<'_, T, ()>
This command will start a coordinated failover between
the currently-connected-to master and one of its replicas. Read more
sourcefn flushdb(&self, flushing_mode: FlushingMode) -> CommandResult<'_, T, ()>
fn flushdb(&self, flushing_mode: FlushingMode) -> CommandResult<'_, T, ()>
Delete all the keys of the currently selected DB. Read more
sourcefn flushall(&self, flushing_mode: FlushingMode) -> CommandResult<'_, T, ()>
fn flushall(&self, flushing_mode: FlushingMode) -> CommandResult<'_, T, ()>
Delete all the keys of all the existing databases, not just the currently selected one. Read more
sourcefn info<SS>(&self, sections: SS) -> CommandResult<'_, T, String>where
SS: SingleArgOrCollection<InfoSection>,
fn info<SS>(&self, sections: SS) -> CommandResult<'_, T, String>where
SS: SingleArgOrCollection<InfoSection>,
This command returns information and statistics about the server
in a format that is simple to parse by computers and easy to read by humans. Read more
sourcefn lastsave(&self) -> CommandResult<'_, T, u64>
fn lastsave(&self) -> CommandResult<'_, T, u64>
Return the UNIX TIME of the last DB save executed with success. Read more
sourcefn latency_doctor(&self) -> CommandResult<'_, T, String>
fn latency_doctor(&self) -> CommandResult<'_, T, String>
This command reports about different latency-related issues and advises about possible remedies. Read more
sourcefn latency_graph(
&self,
event: LatencyHistoryEvent
) -> CommandResult<'_, T, String>
fn latency_graph(
&self,
event: LatencyHistoryEvent
) -> CommandResult<'_, T, String>
Produces an ASCII-art style graph for the specified event. Read more
sourcefn latency_histogram<C, CC, RR>(&self, commands: CC) -> CommandResult<'_, T, RR>where
C: Into<BulkString>,
CC: SingleArgOrCollection<C>,
RR: FromKeyValueValueArray<String, CommandHistogram>,
fn latency_histogram<C, CC, RR>(&self, commands: CC) -> CommandResult<'_, T, RR>where
C: Into<BulkString>,
CC: SingleArgOrCollection<C>,
RR: FromKeyValueValueArray<String, CommandHistogram>,
This command reports a cumulative distribution of latencies
in the format of a histogram for each of the specified command names. Read more
sourcefn latency_history<RR>(
&self,
event: LatencyHistoryEvent
) -> CommandResult<'_, T, RR>where
RR: FromSingleValueArray<(u32, u32)>,
fn latency_history<RR>(
&self,
event: LatencyHistoryEvent
) -> CommandResult<'_, T, RR>where
RR: FromSingleValueArray<(u32, u32)>,
This command returns the raw data of the event’s latency spikes time series. Read more
sourcefn latency_latest<RR>(&self) -> CommandResult<'_, T, RR>where
RR: FromSingleValueArray<(String, u32, u32, u32)>,
fn latency_latest<RR>(&self) -> CommandResult<'_, T, RR>where
RR: FromSingleValueArray<(String, u32, u32, u32)>,
This command reports the latest latency events logged. Read more
sourcefn latency_reset<EE>(&self, events: EE) -> CommandResult<'_, T, usize>where
EE: SingleArgOrCollection<LatencyHistoryEvent>,
fn latency_reset<EE>(&self, events: EE) -> CommandResult<'_, T, usize>where
EE: SingleArgOrCollection<LatencyHistoryEvent>,
This command resets the latency spikes time series of all, or only some, events. Read more
sourcefn lolwut(&self, options: LolWutOptions) -> CommandResult<'_, T, String>
fn lolwut(&self, options: LolWutOptions) -> CommandResult<'_, T, String>
The LOLWUT command displays the Redis version: however as a side effect of doing so,
it also creates a piece of generative computer art that is different with each version of Redis. Read more
sourcefn memory_doctor(&self) -> CommandResult<'_, T, String>
fn memory_doctor(&self) -> CommandResult<'_, T, String>
This command reports about different memory-related issues that
the Redis server experiences, and advises about possible remedies. Read more
sourcefn memory_malloc_stats(&self) -> CommandResult<'_, T, String>
fn memory_malloc_stats(&self) -> CommandResult<'_, T, String>
This command provides an internal statistics report from the memory allocator. Read more
sourcefn memory_purge(&self) -> CommandResult<'_, T, ()>
fn memory_purge(&self) -> CommandResult<'_, T, ()>
This command attempts to purge dirty pages so these can be reclaimed by the allocator. Read more
sourcefn memory_stats(&self) -> CommandResult<'_, T, MemoryStats>
fn memory_stats(&self) -> CommandResult<'_, T, MemoryStats>
This command returns information about the memory usage of the server. Read more
sourcefn memory_usage<K>(
&self,
key: K,
options: MemoryUsageOptions
) -> CommandResult<'_, T, Option<usize>>where
K: Into<BulkString>,
fn memory_usage<K>(
&self,
key: K,
options: MemoryUsageOptions
) -> CommandResult<'_, T, Option<usize>>where
K: Into<BulkString>,
This command reports the number of bytes that a key and its value require to be stored in RAM. Read more
sourcefn module_list<MM>(&self) -> CommandResult<'_, T, MM>where
MM: FromSingleValueArray<ModuleInfo>,
fn module_list<MM>(&self) -> CommandResult<'_, T, MM>where
MM: FromSingleValueArray<ModuleInfo>,
Returns information about the modules loaded to the server. Read more
sourcefn module_load<P>(
&self,
path: P,
options: ModuleLoadOptions
) -> CommandResult<'_, T, ()>where
P: Into<BulkString>,
fn module_load<P>(
&self,
path: P,
options: ModuleLoadOptions
) -> CommandResult<'_, T, ()>where
P: Into<BulkString>,
Loads a module from a dynamic library at runtime. Read more
sourcefn module_unload<N>(&self, name: N) -> CommandResult<'_, T, ()>where
N: Into<BulkString>,
fn module_unload<N>(&self, name: N) -> CommandResult<'_, T, ()>where
N: Into<BulkString>,
Unloads a module. Read more
sourcefn replicaof(&self, options: ReplicaOfOptions) -> CommandResult<'_, T, ()>
fn replicaof(&self, options: ReplicaOfOptions) -> CommandResult<'_, T, ()>
This command can change the replication settings of a replica on the fly. Read more
sourcefn role(&self) -> CommandResult<'_, T, RoleResult>
fn role(&self) -> CommandResult<'_, T, RoleResult>
Provide information on the role of a Redis instance in the context of replication,
by returning if the instance is currently a
master
, slave
, or sentinel
. Read moresourcefn save(&self) -> CommandResult<'_, T, ()>
fn save(&self) -> CommandResult<'_, T, ()>
This command performs a synchronous save of the dataset producing a point in time snapshot
of all the data inside the Redis instance, in the form of an RDB file. Read more
sourcefn shutdown(&self, options: ShutdownOptions) -> CommandResult<'_, T, ()>
fn shutdown(&self, options: ShutdownOptions) -> CommandResult<'_, T, ()>
Shutdown the server Read more
sourcefn slowlog_get(
&self,
options: SlowLogOptions
) -> CommandResult<'_, T, Vec<SlowLogEntry>>
fn slowlog_get(
&self,
options: SlowLogOptions
) -> CommandResult<'_, T, Vec<SlowLogEntry>>
This command returns entries from the slow log in chronological order. Read more
sourcefn slowlog_len(&self) -> CommandResult<'_, T, usize>
fn slowlog_len(&self) -> CommandResult<'_, T, usize>
This command returns the current number of entries in the slow log. Read more
sourcefn slowlog_reset(&self) -> CommandResult<'_, T, ()>
fn slowlog_reset(&self) -> CommandResult<'_, T, ()>
This command resets the slow log, clearing all entries in it. Read more
sourceimpl SetCommands<ClientResult> for Client
impl SetCommands<ClientResult> for Client
sourcefn sadd<K, M, C>(&self, key: K, members: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
fn sadd<K, M, C>(&self, key: K, members: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
Add the specified members to the set stored at key. Read more
sourcefn scard<K>(&self, key: K) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
fn scard<K>(&self, key: K) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
Returns the set cardinality (number of elements) of the set stored at key. Read more
sourcefn sdiff<K, M, C, A>(&self, keys: C) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
A: FromSingleValueArray<M>,
fn sdiff<K, M, C, A>(&self, keys: C) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
A: FromSingleValueArray<M>,
Returns the members of the set resulting from the difference
between the first set and all the successive sets. Read more
sourcefn sdiffstore<D, K, C>(
&self,
destination: D,
keys: C
) -> CommandResult<'_, T, usize>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn sdiffstore<D, K, C>(
&self,
destination: D,
keys: C
) -> CommandResult<'_, T, usize>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
sourcefn sinter<K, M, C, A>(&self, keys: C) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
A: FromSingleValueArray<M>,
fn sinter<K, M, C, A>(&self, keys: C) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
A: FromSingleValueArray<M>,
Returns the members of the set resulting from the intersection of all the given sets. Read more
sourcefn sintercard<K, C>(&self, keys: C, limit: usize) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn sintercard<K, C>(&self, keys: C, limit: usize) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
sourcefn sinterstore<D, K, C>(
&self,
destination: D,
keys: C
) -> CommandResult<'_, T, usize>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn sinterstore<D, K, C>(
&self,
destination: D,
keys: C
) -> CommandResult<'_, T, usize>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
sourcefn sismember<K, M>(&self, key: K, member: M) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
M: Into<BulkString>,
fn sismember<K, M>(&self, key: K, member: M) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
M: Into<BulkString>,
Returns if member is a member of the set stored at key. Read more
sourcefn smembers<K, M, A>(&self, key: K) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
A: FromSingleValueArray<M>,
fn smembers<K, M, A>(&self, key: K) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
A: FromSingleValueArray<M>,
Returns all the members of the set value stored at key. Read more
sourcefn smismember<K, M, C>(
&self,
key: K,
members: C
) -> CommandResult<'_, T, Vec<bool>>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
fn smismember<K, M, C>(
&self,
key: K,
members: C
) -> CommandResult<'_, T, Vec<bool>>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
Returns whether each member is a member of the set stored at key. Read more
sourcefn smove<S, D, M>(
&self,
source: S,
destination: D,
member: M
) -> CommandResult<'_, T, bool>where
S: Into<BulkString>,
D: Into<BulkString>,
M: Into<BulkString>,
fn smove<S, D, M>(
&self,
source: S,
destination: D,
member: M
) -> CommandResult<'_, T, bool>where
S: Into<BulkString>,
D: Into<BulkString>,
M: Into<BulkString>,
Move member from the set at source to the set at destination. Read more
sourcefn spop<K, M, A>(&self, key: K, count: usize) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
A: FromSingleValueArray<M>,
fn spop<K, M, A>(&self, key: K, count: usize) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
A: FromSingleValueArray<M>,
Removes and returns one or more random members from the set value store at key. Read more
sourcefn srandmember<K, M, A>(&self, key: K, count: usize) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
A: FromSingleValueArray<M>,
fn srandmember<K, M, A>(&self, key: K, count: usize) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
A: FromSingleValueArray<M>,
Removes and returns one or more random members from the set value store at key. Read more
sourcefn srem<K, M, C>(&self, key: K, members: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
fn srem<K, M, C>(&self, key: K, members: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
Remove the specified members from the set stored at key. Read more
sourcefn sscan<K, M>(
&self,
key: K,
cursor: u64,
options: SScanOptions
) -> CommandResult<'_, T, (u64, Vec<M>)>where
K: Into<BulkString>,
M: FromValue,
fn sscan<K, M>(
&self,
key: K,
cursor: u64,
options: SScanOptions
) -> CommandResult<'_, T, (u64, Vec<M>)>where
K: Into<BulkString>,
M: FromValue,
Iterates elements of Sets types. Read more
sourcefn sunion<K, M, C, A>(&self, keys: C) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
A: FromSingleValueArray<M>,
fn sunion<K, M, C, A>(&self, keys: C) -> CommandResult<'_, T, A>where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
A: FromSingleValueArray<M>,
Returns the members of the set resulting from the union of all the given sets. Read more
sourcefn sunionstore<D, K, C>(
&self,
destination: D,
keys: C
) -> CommandResult<'_, T, usize>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn sunionstore<D, K, C>(
&self,
destination: D,
keys: C
) -> CommandResult<'_, T, usize>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
sourceimpl SortedSetCommands<ClientResult> for Client
impl SortedSetCommands<ClientResult> for Client
sourcefn bzmpop<K, C, E>(
&self,
timeout: f64,
keys: C,
where_: ZWhere,
count: usize
) -> CommandResult<'_, T, Option<ZMPopResult<E>>>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
E: FromValue,
fn bzmpop<K, C, E>(
&self,
timeout: f64,
keys: C,
where_: ZWhere,
count: usize
) -> CommandResult<'_, T, Option<ZMPopResult<E>>>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
E: FromValue,
sourcefn bzpopmax<K, KK, E, K1>(
&self,
keys: KK,
timeout: f64
) -> CommandResult<'_, T, Option<Vec<(K1, E, f64)>>>where
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
K1: FromValue,
E: FromValue,
fn bzpopmax<K, KK, E, K1>(
&self,
keys: KK,
timeout: f64
) -> CommandResult<'_, T, Option<Vec<(K1, E, f64)>>>where
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
K1: FromValue,
E: FromValue,
sourcefn bzpopmin<K, KK, E, K1>(
&self,
keys: KK,
timeout: f64
) -> CommandResult<'_, T, Option<Vec<(K1, E, f64)>>>where
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
K1: FromValue,
E: FromValue,
fn bzpopmin<K, KK, E, K1>(
&self,
keys: KK,
timeout: f64
) -> CommandResult<'_, T, Option<Vec<(K1, E, f64)>>>where
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
K1: FromValue,
E: FromValue,
sourcefn zadd<K, M, I>(
&self,
key: K,
items: I,
options: ZAddOptions
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
M: Into<BulkString>,
I: ArgsOrCollection<(f64, M)>,
fn zadd<K, M, I>(
&self,
key: K,
items: I,
options: ZAddOptions
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
M: Into<BulkString>,
I: ArgsOrCollection<(f64, M)>,
Adds all the specified members with the specified scores
to the sorted set stored at key. Read more
sourcefn zadd_incr<K, M>(
&self,
key: K,
condition: ZAddCondition,
comparison: ZAddComparison,
change: bool,
score: f64,
member: M
) -> CommandResult<'_, T, Option<f64>>where
K: Into<BulkString>,
M: Into<BulkString>,
fn zadd_incr<K, M>(
&self,
key: K,
condition: ZAddCondition,
comparison: ZAddComparison,
change: bool,
score: f64,
member: M
) -> CommandResult<'_, T, Option<f64>>where
K: Into<BulkString>,
M: Into<BulkString>,
In this mode ZADD acts like ZINCRBY.
Only one score-element pair can be specified in this mode. Read more
sourcefn zcard<K>(&self, key: K) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
fn zcard<K>(&self, key: K) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
Returns the sorted set cardinality (number of elements)
of the sorted set stored at key. Read more
sourcefn zcount<K, M1, M2>(
&self,
key: K,
min: M1,
max: M2
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
M1: Into<BulkString>,
M2: Into<BulkString>,
fn zcount<K, M1, M2>(
&self,
key: K,
min: M1,
max: M2
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
M1: Into<BulkString>,
M2: Into<BulkString>,
Returns the number of elements in the sorted set at key with a score between min and max. Read more
sourcefn zdiff<K, C, E>(&self, keys: C) -> CommandResult<'_, T, Vec<E>>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
E: FromValue,
fn zdiff<K, C, E>(&self, keys: C) -> CommandResult<'_, T, Vec<E>>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
E: FromValue,
This command is similar to zdiffstore, but instead of storing the resulting sorted set,
it is returned to the client. Read more
sourcefn zdiff_with_scores<K, C, E>(
&self,
keys: C
) -> CommandResult<'_, T, Vec<(E, f64)>>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
E: FromValue,
fn zdiff_with_scores<K, C, E>(
&self,
keys: C
) -> CommandResult<'_, T, Vec<(E, f64)>>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
E: FromValue,
This command is similar to zdiffstore, but instead of storing the resulting sorted set,
it is returned to the client. Read more
sourcefn zdiffstore<D, K, C>(
&self,
destination: D,
keys: C
) -> CommandResult<'_, T, usize>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn zdiffstore<D, K, C>(
&self,
destination: D,
keys: C
) -> CommandResult<'_, T, usize>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
Computes the difference between the first and all successive
input sorted sets and stores the result in destination. Read more
sourcefn zincrby<K, M>(
&self,
key: K,
increment: f64,
member: M
) -> CommandResult<'_, T, f64>where
K: Into<BulkString>,
M: Into<BulkString>,
fn zincrby<K, M>(
&self,
key: K,
increment: f64,
member: M
) -> CommandResult<'_, T, f64>where
K: Into<BulkString>,
M: Into<BulkString>,
Increments the score of member in the sorted set stored at key by increment. Read more
sourcefn zinter<K, C, W, E>(
&self,
keys: C,
weights: Option<W>,
aggregate: ZAggregate
) -> CommandResult<'_, T, Vec<E>>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
W: SingleArgOrCollection<f64>,
E: FromValue,
fn zinter<K, C, W, E>(
&self,
keys: C,
weights: Option<W>,
aggregate: ZAggregate
) -> CommandResult<'_, T, Vec<E>>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
W: SingleArgOrCollection<f64>,
E: FromValue,
This command is similar to zinterstore,
but instead of storing the resulting sorted set, it is returned to the client. Read more
sourcefn zinter_with_scores<K, C, W, E>(
&self,
keys: C,
weights: Option<W>,
aggregate: ZAggregate
) -> CommandResult<'_, T, Vec<(E, f64)>>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
W: SingleArgOrCollection<f64>,
E: FromValue,
fn zinter_with_scores<K, C, W, E>(
&self,
keys: C,
weights: Option<W>,
aggregate: ZAggregate
) -> CommandResult<'_, T, Vec<(E, f64)>>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
W: SingleArgOrCollection<f64>,
E: FromValue,
This command is similar to zinterstore,
but instead of storing the resulting sorted set, it is returned to the client. Read more
sourcefn zintercard<K, C>(&self, keys: C, limit: usize) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn zintercard<K, C>(&self, keys: C, limit: usize) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
sourcefn zinterstore<D, K, C, W>(
&self,
destination: D,
keys: C,
weights: Option<W>,
aggregate: ZAggregate
) -> CommandResult<'_, T, usize>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
W: SingleArgOrCollection<f64>,
fn zinterstore<D, K, C, W>(
&self,
destination: D,
keys: C,
weights: Option<W>,
aggregate: ZAggregate
) -> CommandResult<'_, T, usize>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
W: SingleArgOrCollection<f64>,
Computes the intersection of numkeys sorted sets given by the specified keys,
and stores the result in destination. Read more
sourcefn zlexcount<K, M1, M2>(
&self,
key: K,
min: M1,
max: M2
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
M1: Into<BulkString>,
M2: Into<BulkString>,
fn zlexcount<K, M1, M2>(
&self,
key: K,
min: M1,
max: M2
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
M1: Into<BulkString>,
M2: Into<BulkString>,
When all the elements in a sorted set are inserted with the same score,
in order to force lexicographical ordering, this command returns the number
of elements in the sorted set at key with a value between min and max. Read more
sourcefn zmpop<K, C, E>(
&self,
keys: C,
where_: ZWhere,
count: usize
) -> CommandResult<'_, T, Option<ZMPopResult<E>>>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
E: FromValue,
fn zmpop<K, C, E>(
&self,
keys: C,
where_: ZWhere,
count: usize
) -> CommandResult<'_, T, Option<ZMPopResult<E>>>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
E: FromValue,
Pops one or more elements, that are member-score pairs,
from the first non-empty sorted set in the provided list of key names. Read more
sourcefn zmscore<K, M, C>(
&self,
key: K,
members: C
) -> CommandResult<'_, T, Vec<Option<f64>>>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
fn zmscore<K, M, C>(
&self,
key: K,
members: C
) -> CommandResult<'_, T, Vec<Option<f64>>>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
Returns the scores associated with the specified members in the sorted set stored at key. Read more
sourcefn zpopmax<K, M>(
&self,
key: K,
count: usize
) -> CommandResult<'_, T, Vec<(M, f64)>>where
K: Into<BulkString>,
M: FromValue,
fn zpopmax<K, M>(
&self,
key: K,
count: usize
) -> CommandResult<'_, T, Vec<(M, f64)>>where
K: Into<BulkString>,
M: FromValue,
Removes and returns up to count members with the highest scores in the sorted set stored at key. Read more
sourcefn zpopmin<K, M>(
&self,
key: K,
count: usize
) -> CommandResult<'_, T, Vec<(M, f64)>>where
K: Into<BulkString>,
M: FromValue,
fn zpopmin<K, M>(
&self,
key: K,
count: usize
) -> CommandResult<'_, T, Vec<(M, f64)>>where
K: Into<BulkString>,
M: FromValue,
Removes and returns up to count members with the lowest scores in the sorted set stored at key. Read more
sourcefn zrandmember<K, E>(&self, key: K) -> CommandResult<'_, T, E>where
K: Into<BulkString>,
E: FromValue,
fn zrandmember<K, E>(&self, key: K) -> CommandResult<'_, T, E>where
K: Into<BulkString>,
E: FromValue,
Return a random element from the sorted set value stored at key. Read more
sourcefn zrandmembers<K, E>(&self, key: K, count: isize) -> CommandResult<'_, T, Vec<E>>where
K: Into<BulkString>,
E: FromValue,
fn zrandmembers<K, E>(&self, key: K, count: isize) -> CommandResult<'_, T, Vec<E>>where
K: Into<BulkString>,
E: FromValue,
Return random elements from the sorted set value stored at key. Read more
sourcefn zrandmembers_with_scores<K, E>(
&self,
key: K,
count: isize
) -> CommandResult<'_, T, Vec<E>>where
K: Into<BulkString>,
E: FromValue,
fn zrandmembers_with_scores<K, E>(
&self,
key: K,
count: isize
) -> CommandResult<'_, T, Vec<E>>where
K: Into<BulkString>,
E: FromValue,
Return random elements with their scores from the sorted set value stored at key. Read more
sourcefn zrange<K, S, E>(
&self,
key: K,
start: S,
stop: S,
options: ZRangeOptions
) -> CommandResult<'_, T, Vec<E>>where
K: Into<BulkString>,
S: Into<BulkString>,
E: FromValue,
fn zrange<K, S, E>(
&self,
key: K,
start: S,
stop: S,
options: ZRangeOptions
) -> CommandResult<'_, T, Vec<E>>where
K: Into<BulkString>,
S: Into<BulkString>,
E: FromValue,
Returns the specified range of elements in the sorted set stored at
key
. Read moresourcefn zrange_with_scores<K, S, E>(
&self,
key: K,
start: S,
stop: S,
options: ZRangeOptions
) -> CommandResult<'_, T, Vec<(E, f64)>>where
K: Into<BulkString>,
S: Into<BulkString>,
E: FromValue,
fn zrange_with_scores<K, S, E>(
&self,
key: K,
start: S,
stop: S,
options: ZRangeOptions
) -> CommandResult<'_, T, Vec<(E, f64)>>where
K: Into<BulkString>,
S: Into<BulkString>,
E: FromValue,
Returns the specified range of elements in the sorted set stored at
key
. Read moresourcefn zrangestore<D, S, SS>(
&self,
dst: D,
src: S,
start: SS,
stop: SS,
options: ZRangeOptions
) -> CommandResult<'_, T, usize>where
D: Into<BulkString>,
S: Into<BulkString>,
SS: Into<BulkString>,
fn zrangestore<D, S, SS>(
&self,
dst: D,
src: S,
start: SS,
stop: SS,
options: ZRangeOptions
) -> CommandResult<'_, T, usize>where
D: Into<BulkString>,
S: Into<BulkString>,
SS: Into<BulkString>,
sourcefn zrank<K, M>(&self, key: K, member: M) -> CommandResult<'_, T, Option<usize>>where
K: Into<BulkString>,
M: Into<BulkString>,
fn zrank<K, M>(&self, key: K, member: M) -> CommandResult<'_, T, Option<usize>>where
K: Into<BulkString>,
M: Into<BulkString>,
Returns the rank of member in the sorted set stored at key,
with the scores ordered from low to high. Read more
sourcefn zrem<K, M, C>(&self, key: K, members: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
fn zrem<K, M, C>(&self, key: K, members: C) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
Removes the specified members from the sorted set stored at key. Read more
sourcefn zremrangebylex<K, S>(
&self,
key: K,
start: S,
stop: S
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
S: Into<BulkString>,
fn zremrangebylex<K, S>(
&self,
key: K,
start: S,
stop: S
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
S: Into<BulkString>,
When all the elements in a sorted set are inserted with the same score,
in order to force lexicographical ordering,
this command removes all elements in the sorted set stored at key
between the lexicographical range specified by min and max. Read more
sourcefn zremrangebyrank<K>(
&self,
key: K,
start: isize,
stop: isize
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
fn zremrangebyrank<K>(
&self,
key: K,
start: isize,
stop: isize
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
Removes all elements in the sorted set stored at key with rank between start and stop. Read more
sourcefn zremrangebyscore<K, S>(
&self,
key: K,
start: S,
stop: S
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
S: Into<BulkString>,
fn zremrangebyscore<K, S>(
&self,
key: K,
start: S,
stop: S
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
S: Into<BulkString>,
Removes all elements in the sorted set stored at key with a score between min and max (inclusive). Read more
sourcefn zrevrank<K, M>(&self, key: K, member: M) -> CommandResult<'_, T, Option<usize>>where
K: Into<BulkString>,
M: Into<BulkString>,
fn zrevrank<K, M>(&self, key: K, member: M) -> CommandResult<'_, T, Option<usize>>where
K: Into<BulkString>,
M: Into<BulkString>,
Returns the rank of member in the sorted set stored at key, with the scores ordered from high to low. Read more
sourcefn zscan<K, M>(
&self,
key: K,
cursor: usize,
options: ZScanOptions
) -> CommandResult<'_, T, (u64, Vec<(M, f64)>)>where
K: Into<BulkString>,
M: FromValue,
fn zscan<K, M>(
&self,
key: K,
cursor: usize,
options: ZScanOptions
) -> CommandResult<'_, T, (u64, Vec<(M, f64)>)>where
K: Into<BulkString>,
M: FromValue,
Iterates elements of Sorted Set types and their associated scores. Read more
sourcefn zscore<K, M>(&self, key: K, member: M) -> CommandResult<'_, T, Option<f64>>where
K: Into<BulkString>,
M: Into<BulkString>,
fn zscore<K, M>(&self, key: K, member: M) -> CommandResult<'_, T, Option<f64>>where
K: Into<BulkString>,
M: Into<BulkString>,
Returns the score of member in the sorted set at key. Read more
sourcefn zunion<K, C, W, E>(
&self,
keys: C,
weights: Option<W>,
aggregate: ZAggregate
) -> CommandResult<'_, T, Vec<E>>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
W: SingleArgOrCollection<f64>,
E: FromValue,
fn zunion<K, C, W, E>(
&self,
keys: C,
weights: Option<W>,
aggregate: ZAggregate
) -> CommandResult<'_, T, Vec<E>>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
W: SingleArgOrCollection<f64>,
E: FromValue,
This command is similar to zunionstore,
but instead of storing the resulting sorted set, it is returned to the client. Read more
sourcefn zunion_with_scores<K, C, W, E>(
&self,
keys: C,
weights: Option<W>,
aggregate: ZAggregate
) -> CommandResult<'_, T, Vec<(E, f64)>>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
W: SingleArgOrCollection<f64>,
E: FromValue,
fn zunion_with_scores<K, C, W, E>(
&self,
keys: C,
weights: Option<W>,
aggregate: ZAggregate
) -> CommandResult<'_, T, Vec<(E, f64)>>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
W: SingleArgOrCollection<f64>,
E: FromValue,
This command is similar to zunionstore,
but instead of storing the resulting sorted set, it is returned to the client. Read more
sourcefn zunionstore<D, K, C, W>(
&self,
destination: D,
keys: C,
weights: Option<W>,
aggregate: ZAggregate
) -> CommandResult<'_, T, usize>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
W: SingleArgOrCollection<f64>,
fn zunionstore<D, K, C, W>(
&self,
destination: D,
keys: C,
weights: Option<W>,
aggregate: ZAggregate
) -> CommandResult<'_, T, usize>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
W: SingleArgOrCollection<f64>,
Computes the unionsection of numkeys sorted sets given by the specified keys,
and stores the result in destination. Read more
sourceimpl StreamCommands<ClientResult> for Client
impl StreamCommands<ClientResult> for Client
sourcefn xack<K, G, I, II>(
&self,
key: K,
group: G,
ids: II
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
G: Into<BulkString>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
fn xack<K, G, I, II>(
&self,
key: K,
group: G,
ids: II
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
G: Into<BulkString>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
The XACK command removes one or multiple messages
from the Pending Entries List (PEL) of a stream consumer group Read more
sourcefn xadd<K, I, F, V, FFVV, R>(
&self,
key: K,
stream_id: I,
items: FFVV,
options: XAddOptions
) -> CommandResult<'_, T, R>where
K: Into<BulkString>,
I: Into<BulkString>,
F: Into<BulkString>,
V: Into<BulkString>,
FFVV: KeyValueArgOrCollection<F, V>,
R: FromValue,
fn xadd<K, I, F, V, FFVV, R>(
&self,
key: K,
stream_id: I,
items: FFVV,
options: XAddOptions
) -> CommandResult<'_, T, R>where
K: Into<BulkString>,
I: Into<BulkString>,
F: Into<BulkString>,
V: Into<BulkString>,
FFVV: KeyValueArgOrCollection<F, V>,
R: FromValue,
Appends the specified stream entry to the stream at the specified key. Read more
sourcefn xautoclaim<K, G, C, I, V>(
&self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
start: I,
options: XAutoClaimOptions
) -> CommandResult<'_, T, XAutoClaimResult<V>>where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
I: Into<BulkString>,
V: FromValue,
fn xautoclaim<K, G, C, I, V>(
&self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
start: I,
options: XAutoClaimOptions
) -> CommandResult<'_, T, XAutoClaimResult<V>>where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
I: Into<BulkString>,
V: FromValue,
This command transfers ownership of pending stream entries that match the specified criteria. Read more
sourcefn xclaim<K, G, C, I, II, V>(
&self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
ids: II,
options: XClaimOptions
) -> CommandResult<'_, T, Vec<StreamEntry<V>>>where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
V: FromValue,
fn xclaim<K, G, C, I, II, V>(
&self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
ids: II,
options: XClaimOptions
) -> CommandResult<'_, T, Vec<StreamEntry<V>>>where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
V: FromValue,
In the context of a stream consumer group, this command changes the ownership of a pending message,
so that the new owner is the consumer specified as the command argument. Read more
sourcefn xdel<K, I, II>(&self, key: K, ids: II) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
fn xdel<K, I, II>(&self, key: K, ids: II) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
Removes the specified entries from a stream, and returns the number of entries deleted. Read more
sourcefn xgroup_create<K, G, I>(
&self,
key: K,
groupname: G,
id: I,
options: XGroupCreateOptions
) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
G: Into<BulkString>,
I: Into<BulkString>,
fn xgroup_create<K, G, I>(
&self,
key: K,
groupname: G,
id: I,
options: XGroupCreateOptions
) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
G: Into<BulkString>,
I: Into<BulkString>,
This command creates a new consumer group uniquely identified by for the stream stored at . Read more
sourcefn xgroup_createconsumer<K, G, C>(
&self,
key: K,
groupname: G,
consumername: C
) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
fn xgroup_createconsumer<K, G, C>(
&self,
key: K,
groupname: G,
consumername: C
) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
Create a consumer named
consumername
in the consumer group groupname`` of the stream that's stored at
key. Read moresourcefn xgroup_delconsumer<K, G, C>(
&self,
key: K,
groupname: G,
consumername: C
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
fn xgroup_delconsumer<K, G, C>(
&self,
key: K,
groupname: G,
consumername: C
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
G: Into<BulkString>,
C: Into<BulkString>,
The XGROUP DELCONSUMER command deletes a consumer from the consumer group. Read more
sourcefn xgroup_destroy<K, G>(&self, key: K, groupname: G) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
G: Into<BulkString>,
fn xgroup_destroy<K, G>(&self, key: K, groupname: G) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
G: Into<BulkString>,
The XGROUP DESTROY command completely destroys a consumer group. Read more
sourcefn xgroup_setid<K, G, I>(
&self,
key: K,
groupname: G,
id: I,
entries_read: Option<usize>
) -> CommandResult<'_, T, ()>where
K: Into<BulkString>,
G: Into<BulkString>,
I: Into<BulkString>,
fn xgroup_setid<K, G, I>(
&self,
key: K,
groupname: G,
id: I,
entries_read: Option<usize>
) -> CommandResult<'_, T, ()>where
K: Into<BulkString>,
G: Into<BulkString>,
I: Into<BulkString>,
Set the last delivered ID for a consumer group. Read more
sourcefn xinfo_consumers<K, G>(
&self,
key: K,
groupname: G
) -> CommandResult<'_, T, Vec<XConsumerInfo>>where
K: Into<BulkString>,
G: Into<BulkString>,
fn xinfo_consumers<K, G>(
&self,
key: K,
groupname: G
) -> CommandResult<'_, T, Vec<XConsumerInfo>>where
K: Into<BulkString>,
G: Into<BulkString>,
This command returns the list of consumers that belong to the
groupname
consumer group of the stream stored at key
. Read moresourcefn xinfo_groups<K>(&self, key: K) -> CommandResult<'_, T, Vec<XGroupInfo>>where
K: Into<BulkString>,
fn xinfo_groups<K>(&self, key: K) -> CommandResult<'_, T, Vec<XGroupInfo>>where
K: Into<BulkString>,
This command returns the list of consumers that belong
to the
groupname
consumer group of the stream stored at key
. Read moresourcefn xinfo_stream<K>(
&self,
key: K,
options: XInfoStreamOptions
) -> CommandResult<'_, T, XStreamInfo>where
K: Into<BulkString>,
fn xinfo_stream<K>(
&self,
key: K,
options: XInfoStreamOptions
) -> CommandResult<'_, T, XStreamInfo>where
K: Into<BulkString>,
This command returns information about the stream stored at
key
. Read moresourcefn xlen<K>(&self, key: K) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
fn xlen<K>(&self, key: K) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
Returns the number of entries inside a stream. Read more
sourcefn xpending<K, G>(&self, key: K, group: G) -> CommandResult<'_, T, XPendingResult>where
K: Into<BulkString>,
G: Into<BulkString>,
fn xpending<K, G>(&self, key: K, group: G) -> CommandResult<'_, T, XPendingResult>where
K: Into<BulkString>,
G: Into<BulkString>,
The XPENDING command is the interface to inspect the list of pending messages. Read more
sourcefn xpending_with_options<K, G>(
&self,
key: K,
group: G,
options: XPendingOptions
) -> CommandResult<'_, T, Vec<XPendingMessageResult>>where
K: Into<BulkString>,
G: Into<BulkString>,
fn xpending_with_options<K, G>(
&self,
key: K,
group: G,
options: XPendingOptions
) -> CommandResult<'_, T, Vec<XPendingMessageResult>>where
K: Into<BulkString>,
G: Into<BulkString>,
The XPENDING command is the interface to inspect the list of pending messages. Read more
sourcefn xrange<K, S, E, V>(
&self,
key: K,
start: S,
end: E,
count: Option<usize>
) -> CommandResult<'_, T, Vec<StreamEntry<V>>>where
K: Into<BulkString>,
S: Into<BulkString>,
E: Into<BulkString>,
V: FromValue,
fn xrange<K, S, E, V>(
&self,
key: K,
start: S,
end: E,
count: Option<usize>
) -> CommandResult<'_, T, Vec<StreamEntry<V>>>where
K: Into<BulkString>,
S: Into<BulkString>,
E: Into<BulkString>,
V: FromValue,
The command returns the stream entries matching a given range of IDs. Read more
sourcefn xread<K, KK, I, II, V>(
&self,
options: XReadOptions,
keys: KK,
ids: II
) -> CommandResult<'_, T, Vec<XReadStreamResult<V>>>where
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
V: FromValue,
fn xread<K, KK, I, II, V>(
&self,
options: XReadOptions,
keys: KK,
ids: II
) -> CommandResult<'_, T, Vec<XReadStreamResult<V>>>where
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
V: FromValue,
Read data from one or multiple streams,
only returning entries with an ID greater than the last received ID reported by the caller. Read more
sourcefn xreadgroup<G, C, K, KK, I, II, V>(
&self,
group: G,
consumer: C,
options: XReadGroupOptions,
keys: KK,
ids: II
) -> CommandResult<'_, T, Vec<XReadStreamResult<V>>>where
G: Into<BulkString>,
C: Into<BulkString>,
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
V: FromValue,
fn xreadgroup<G, C, K, KK, I, II, V>(
&self,
group: G,
consumer: C,
options: XReadGroupOptions,
keys: KK,
ids: II
) -> CommandResult<'_, T, Vec<XReadStreamResult<V>>>where
G: Into<BulkString>,
C: Into<BulkString>,
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
I: Into<BulkString>,
II: SingleArgOrCollection<I>,
V: FromValue,
sourcefn xrevrange<K, E, S, V>(
&self,
key: K,
end: E,
start: S,
count: Option<usize>
) -> CommandResult<'_, T, Vec<StreamEntry<V>>>where
K: Into<BulkString>,
E: Into<BulkString>,
S: Into<BulkString>,
V: FromValue,
fn xrevrange<K, E, S, V>(
&self,
key: K,
end: E,
start: S,
count: Option<usize>
) -> CommandResult<'_, T, Vec<StreamEntry<V>>>where
K: Into<BulkString>,
E: Into<BulkString>,
S: Into<BulkString>,
V: FromValue,
sourcefn xtrim<K>(&self, key: K, options: XTrimOptions) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
fn xtrim<K>(&self, key: K, options: XTrimOptions) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
XTRIM trims the stream by evicting older entries (entries with lower IDs) if needed. Read more
sourceimpl StringCommands<ClientResult> for Client
impl StringCommands<ClientResult> for Client
sourcefn append<K, V>(&self, key: K, value: V) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
V: Into<BulkString>,
fn append<K, V>(&self, key: K, value: V) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
V: Into<BulkString>,
If key already exists and is a string,
this command appends the value at the end of the string.
If key does not exist it is created and set as an empty string,
so APPEND will be similar to SET in this special case. Read more
sourcefn decr<K>(&self, key: K) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
fn decr<K>(&self, key: K) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
Decrements the number stored at key by one. Read more
sourcefn decrby<K>(&self, key: K, decrement: i64) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
fn decrby<K>(&self, key: K, decrement: i64) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
Decrements the number stored at key by one. Read more
sourcefn get<K, V>(&self, key: K) -> CommandResult<'_, T, V>where
K: Into<BulkString>,
V: FromValue,
Self: Sized,
fn get<K, V>(&self, key: K) -> CommandResult<'_, T, V>where
K: Into<BulkString>,
V: FromValue,
Self: Sized,
Get the value of key. Read more
sourcefn getdel<K, V>(&self, key: K) -> CommandResult<'_, T, V>where
K: Into<BulkString>,
V: FromValue,
fn getdel<K, V>(&self, key: K) -> CommandResult<'_, T, V>where
K: Into<BulkString>,
V: FromValue,
Get the value of key and delete the key. Read more
sourcefn getex<K, V>(&self, key: K, options: GetExOptions) -> CommandResult<'_, T, V>where
K: Into<BulkString>,
V: FromValue,
fn getex<K, V>(&self, key: K, options: GetExOptions) -> CommandResult<'_, T, V>where
K: Into<BulkString>,
V: FromValue,
Get the value of key and optionally set its expiration. GETEX is similar to GET, but is a write command with additional options. Read more
sourcefn getrange<K, V>(
&self,
key: K,
start: usize,
end: isize
) -> CommandResult<'_, T, V>where
K: Into<BulkString>,
V: FromValue,
fn getrange<K, V>(
&self,
key: K,
start: usize,
end: isize
) -> CommandResult<'_, T, V>where
K: Into<BulkString>,
V: FromValue,
Returns the substring of the string value stored at key, determined by the offsets start and end (both are inclusive). Read more
sourcefn getset<K, V, R>(&self, key: K, value: V) -> CommandResult<'_, T, R>where
K: Into<BulkString>,
V: Into<BulkString>,
R: FromValue,
fn getset<K, V, R>(&self, key: K, value: V) -> CommandResult<'_, T, R>where
K: Into<BulkString>,
V: Into<BulkString>,
R: FromValue,
Atomically sets key to value and returns the old value stored at key.
Returns an error when key exists but does not hold a string value.
Any previous time to live associated with the key is discarded on successful SET operation. Read more
sourcefn incr<K>(&self, key: K) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
fn incr<K>(&self, key: K) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
Increments the number stored at key by one. Read more
sourcefn incrby<K>(&self, key: K, increment: i64) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
fn incrby<K>(&self, key: K, increment: i64) -> CommandResult<'_, T, i64>where
K: Into<BulkString>,
Increments the number stored at key by increment. Read more
sourcefn incrbyfloat<K>(&self, key: K, increment: f64) -> CommandResult<'_, T, f64>where
K: Into<BulkString>,
fn incrbyfloat<K>(&self, key: K, increment: f64) -> CommandResult<'_, T, f64>where
K: Into<BulkString>,
Increment the string representing a floating point number stored at key by the specified increment.
By using a negative increment value, the result is that the value stored at the key is decremented (by the obvious properties of addition).
If the key does not exist, it is set to 0 before performing the operation.
An error is returned if one of the following conditions occur: Read more
sourcefn lcs<K, V>(&self, key1: K, key2: K) -> CommandResult<'_, T, V>where
K: Into<BulkString>,
V: FromValue,
fn lcs<K, V>(&self, key1: K, key2: K) -> CommandResult<'_, T, V>where
K: Into<BulkString>,
V: FromValue,
The LCS command implements the longest common subsequence algorithm Read more
sourcefn lcs_len<K>(&self, key1: K, key2: K) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
fn lcs_len<K>(&self, key1: K, key2: K) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
The LCS command implements the longest common subsequence algorithm Read more
sourcefn lcs_idx<K>(
&self,
key1: K,
key2: K,
min_match_len: Option<usize>,
with_match_len: bool
) -> CommandResult<'_, T, LcsResult>where
K: Into<BulkString>,
fn lcs_idx<K>(
&self,
key1: K,
key2: K,
min_match_len: Option<usize>,
with_match_len: bool
) -> CommandResult<'_, T, LcsResult>where
K: Into<BulkString>,
The LCS command implements the longest common subsequence algorithm Read more
sourcefn mget<K, V, C>(&self, keys: C) -> CommandResult<'_, T, Vec<Option<V>>>where
K: Into<BulkString>,
V: FromValue,
C: SingleArgOrCollection<K>,
fn mget<K, V, C>(&self, keys: C) -> CommandResult<'_, T, Vec<Option<V>>>where
K: Into<BulkString>,
V: FromValue,
C: SingleArgOrCollection<K>,
Returns the values of all specified keys. Read more
sourcefn mset<K, V, C>(&self, items: C) -> CommandResult<'_, T, ()>where
C: KeyValueArgOrCollection<K, V>,
K: Into<BulkString>,
V: Into<BulkString>,
fn mset<K, V, C>(&self, items: C) -> CommandResult<'_, T, ()>where
C: KeyValueArgOrCollection<K, V>,
K: Into<BulkString>,
V: Into<BulkString>,
Sets the given keys to their respective values. Read more
sourcefn msetnx<K, V, C>(&self, items: C) -> CommandResult<'_, T, bool>where
C: KeyValueArgOrCollection<K, V>,
K: Into<BulkString>,
V: Into<BulkString>,
fn msetnx<K, V, C>(&self, items: C) -> CommandResult<'_, T, bool>where
C: KeyValueArgOrCollection<K, V>,
K: Into<BulkString>,
V: Into<BulkString>,
Sets the given keys to their respective values.
MSETNX will not perform any operation at all even if just a single key already exists. Read more
sourcefn psetex<K, V>(
&self,
key: K,
milliseconds: u64,
value: V
) -> CommandResult<'_, T, ()>where
K: Into<BulkString>,
V: Into<BulkString>,
fn psetex<K, V>(
&self,
key: K,
milliseconds: u64,
value: V
) -> CommandResult<'_, T, ()>where
K: Into<BulkString>,
V: Into<BulkString>,
sourcefn set<K, V>(&self, key: K, value: V) -> CommandResult<'_, T, ()>where
K: Into<BulkString>,
V: Into<BulkString>,
Self: Sized,
fn set<K, V>(&self, key: K, value: V) -> CommandResult<'_, T, ()>where
K: Into<BulkString>,
V: Into<BulkString>,
Self: Sized,
Set key to hold the string value. Read more
sourcefn set_with_options<K, V>(
&self,
key: K,
value: V,
condition: SetCondition,
expiration: SetExpiration,
keep_ttl: bool
) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
V: Into<BulkString>,
fn set_with_options<K, V>(
&self,
key: K,
value: V,
condition: SetCondition,
expiration: SetExpiration,
keep_ttl: bool
) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
V: Into<BulkString>,
Set key to hold the string value. Read more
sourcefn set_get_with_options<K, V1, V2>(
&self,
key: K,
value: V1,
condition: SetCondition,
expiration: SetExpiration,
keep_ttl: bool
) -> CommandResult<'_, T, V2>where
K: Into<BulkString>,
V1: Into<BulkString>,
V2: FromValue,
fn set_get_with_options<K, V1, V2>(
&self,
key: K,
value: V1,
condition: SetCondition,
expiration: SetExpiration,
keep_ttl: bool
) -> CommandResult<'_, T, V2>where
K: Into<BulkString>,
V1: Into<BulkString>,
V2: FromValue,
Set key to hold the string value wit GET option enforced Read more
sourcefn setex<K, V>(&self, key: K, seconds: u64, value: V) -> CommandResult<'_, T, ()>where
K: Into<BulkString>,
V: Into<BulkString>,
fn setex<K, V>(&self, key: K, seconds: u64, value: V) -> CommandResult<'_, T, ()>where
K: Into<BulkString>,
V: Into<BulkString>,
Set key to hold the string value and set key to timeout after a given number of seconds. Read more
sourcefn setnx<K, V>(&self, key: K, value: V) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
V: Into<BulkString>,
fn setnx<K, V>(&self, key: K, value: V) -> CommandResult<'_, T, bool>where
K: Into<BulkString>,
V: Into<BulkString>,
Set key to hold string value if key does not exist. Read more
sourcefn setrange<K, V>(
&self,
key: K,
offset: usize,
value: V
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
V: Into<BulkString>,
fn setrange<K, V>(
&self,
key: K,
offset: usize,
value: V
) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
V: Into<BulkString>,
Overwrites part of the string stored at key,
starting at the specified offset,
for the entire length of value. Read more
sourcefn strlen<K>(&self, key: K) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
fn strlen<K>(&self, key: K) -> CommandResult<'_, T, usize>where
K: Into<BulkString>,
Returns the length of the string value stored at key. Read more
sourceimpl TransactionCommands<ClientResult> for Client
impl TransactionCommands<ClientResult> for Client
sourcefn watch<K, KK>(&self, keys: KK) -> CommandResult<'_, T, ()>where
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
fn watch<K, KK>(&self, keys: KK) -> CommandResult<'_, T, ()>where
K: Into<BulkString>,
KK: SingleArgOrCollection<K>,
Marks the given keys to be watched for conditional execution of a transaction. Read more
sourcefn unwatch(&self) -> CommandResult<'_, T, ()>
fn unwatch(&self) -> CommandResult<'_, T, ()>
Flushes all the previously watched keys for a transaction. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more