pub struct Transaction { /* private fields */ }
Expand description
Represents an on-going transaction
on a specific client instance.
Implementations§
Trait Implementations§
Source§impl BitmapCommands for Transaction
impl BitmapCommands for Transaction
Source§fn bitcount<K>(
&mut self,
key: K,
range: BitRange,
) -> PreparedCommand<'_, Self, usize>
fn bitcount<K>( &mut self, key: K, range: BitRange, ) -> PreparedCommand<'_, Self, usize>
Count the number of set bits (population counting) in a string. Read more
Source§fn bitfield<K, C, E, O>(
&mut self,
key: K,
sub_commands: C,
) -> PreparedCommand<'_, Self, Vec<u64>>where
Self: Sized,
K: Into<CommandArg>,
E: Into<CommandArg>,
O: Into<CommandArg>,
C: ArgsOrCollection<BitFieldSubCommand<E, O>>,
fn bitfield<K, C, E, O>(
&mut self,
key: K,
sub_commands: C,
) -> PreparedCommand<'_, Self, Vec<u64>>where
Self: Sized,
K: Into<CommandArg>,
E: Into<CommandArg>,
O: Into<CommandArg>,
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
Source§fn bitfield_readonly<K, C, E, O>(
&mut self,
key: K,
get_commands: C,
) -> PreparedCommand<'_, Self, Vec<u64>>where
Self: Sized,
K: Into<CommandArg>,
E: Into<CommandArg>,
O: Into<CommandArg>,
C: ArgsOrCollection<BitFieldGetSubCommand<E, O>>,
fn bitfield_readonly<K, C, E, O>(
&mut self,
key: K,
get_commands: C,
) -> PreparedCommand<'_, Self, Vec<u64>>where
Self: Sized,
K: Into<CommandArg>,
E: Into<CommandArg>,
O: Into<CommandArg>,
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
Source§fn bitop<D, K, KK>(
&mut self,
operation: BitOperation,
dest_key: D,
keys: KK,
) -> PreparedCommand<'_, Self, usize>
fn bitop<D, K, KK>( &mut self, operation: BitOperation, dest_key: D, keys: KK, ) -> PreparedCommand<'_, Self, usize>
Perform a bitwise operation between multiple keys (containing string values)
and store the result in the destination key. Read more
Source§fn bitpos<K>(
&mut self,
key: K,
bit: u64,
range: BitRange,
) -> PreparedCommand<'_, Self, usize>
fn bitpos<K>( &mut self, key: K, bit: u64, range: BitRange, ) -> PreparedCommand<'_, Self, usize>
Perform a bitwise operation between multiple keys (containing string values)
and store the result in the destination key. Read more
Source§impl GenericCommands for Transaction
impl GenericCommands for Transaction
Source§fn copy<S, D>(
&mut self,
source: S,
destination: D,
destination_db: Option<usize>,
replace: bool,
) -> PreparedCommand<'_, Self, bool>
fn copy<S, D>( &mut self, source: S, destination: D, destination_db: Option<usize>, replace: bool, ) -> PreparedCommand<'_, Self, bool>
This command copies the value stored at the source key to the destination key. Read more
Source§fn del<K, C>(&mut self, keys: C) -> PreparedCommand<'_, Self, usize>
fn del<K, C>(&mut self, keys: C) -> PreparedCommand<'_, Self, usize>
Removes the specified keys. A key is ignored if it does not exist. Read more
Source§fn dump<K>(&mut self, key: K) -> PreparedCommand<'_, Self, DumpResult>
fn dump<K>(&mut self, key: K) -> PreparedCommand<'_, Self, DumpResult>
Serialize the value stored at key in a Redis-specific format and return it to the user. Read more
Source§fn exists<K, C>(&mut self, keys: C) -> PreparedCommand<'_, Self, usize>
fn exists<K, C>(&mut self, keys: C) -> PreparedCommand<'_, Self, usize>
Returns if keys exist. Read more
Source§fn expire<K>(
&mut self,
key: K,
seconds: u64,
option: ExpireOption,
) -> PreparedCommand<'_, Self, bool>
fn expire<K>( &mut self, key: K, seconds: u64, option: ExpireOption, ) -> PreparedCommand<'_, Self, bool>
Set a timeout on key in seconds Read more
Source§fn expireat<K>(
&mut self,
key: K,
unix_time_seconds: u64,
option: ExpireOption,
) -> PreparedCommand<'_, Self, bool>
fn expireat<K>( &mut self, key: K, unix_time_seconds: u64, option: ExpireOption, ) -> PreparedCommand<'_, Self, bool>
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
Source§fn expiretime<K>(&mut self, key: K) -> PreparedCommand<'_, Self, i64>
fn expiretime<K>(&mut self, key: K) -> PreparedCommand<'_, Self, i64>
Returns the absolute Unix timestamp (since January 1, 1970) in seconds at which the given key will expire. Read more
Source§fn keys<P, K, A>(&mut self, pattern: P) -> PreparedCommand<'_, Self, A>
fn keys<P, K, A>(&mut self, pattern: P) -> PreparedCommand<'_, Self, A>
Returns all keys matching pattern. Read more
Source§fn migrate<H, K>(
&mut self,
host: H,
port: u16,
key: K,
destination_db: usize,
timeout: u64,
options: MigrateOptions,
) -> PreparedCommand<'_, Self, MigrateResult>
fn migrate<H, K>( &mut self, host: H, port: u16, key: K, destination_db: usize, timeout: u64, options: MigrateOptions, ) -> PreparedCommand<'_, Self, MigrateResult>
Atomically transfer a key or a collection of keys from a source Redis instance to a destination Redis instance. Read more
Source§fn move_<K>(&mut self, key: K, db: usize) -> PreparedCommand<'_, Self, i64>
fn move_<K>(&mut self, key: K, db: usize) -> PreparedCommand<'_, Self, i64>
Move key from the currently selected database to the specified destination database. Read more
Source§fn object_encoding<K, E>(&mut self, key: K) -> PreparedCommand<'_, Self, E>
fn object_encoding<K, E>(&mut self, key: K) -> PreparedCommand<'_, Self, E>
Returns the internal encoding for the Redis object stored at
key
Read moreSource§fn object_freq<K>(&mut self, key: K) -> PreparedCommand<'_, Self, i64>
fn object_freq<K>(&mut self, key: K) -> PreparedCommand<'_, Self, i64>
This command returns the logarithmic access frequency counter of a Redis object stored at
key
. Read moreSource§fn object_idle_time<K>(&mut self, key: K) -> PreparedCommand<'_, Self, i64>
fn object_idle_time<K>(&mut self, key: K) -> PreparedCommand<'_, Self, i64>
This command returns the time in seconds since the last access to the value stored at
key
. Read moreSource§fn object_refcount<K>(&mut self, key: K) -> PreparedCommand<'_, Self, i64>
fn object_refcount<K>(&mut self, key: K) -> PreparedCommand<'_, Self, i64>
This command returns the reference count of the stored at
key
. Read moreSource§fn persist<K>(&mut self, key: K) -> PreparedCommand<'_, Self, bool>
fn persist<K>(&mut self, key: K) -> PreparedCommand<'_, Self, bool>
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
Source§fn pexpire<K>(
&mut self,
key: K,
milliseconds: u64,
option: ExpireOption,
) -> PreparedCommand<'_, Self, bool>
fn pexpire<K>( &mut self, key: K, milliseconds: u64, option: ExpireOption, ) -> PreparedCommand<'_, Self, bool>
This command works exactly like EXPIRE but the time to live of the key is specified in milliseconds instead of seconds. Read more
Source§fn pexpireat<K>(
&mut self,
key: K,
unix_time_milliseconds: u64,
option: ExpireOption,
) -> PreparedCommand<'_, Self, bool>
fn pexpireat<K>( &mut self, key: K, unix_time_milliseconds: u64, option: ExpireOption, ) -> PreparedCommand<'_, Self, bool>
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
Source§fn pexpiretime<K>(&mut self, key: K) -> PreparedCommand<'_, Self, i64>
fn pexpiretime<K>(&mut self, key: K) -> PreparedCommand<'_, Self, i64>
PEXPIRETIME has the same semantic as EXPIRETIME,
but returns the absolute Unix expiration timestamp in milliseconds instead of seconds. Read more
Source§fn pttl<K>(&mut self, key: K) -> PreparedCommand<'_, Self, i64>
fn pttl<K>(&mut self, key: K) -> PreparedCommand<'_, Self, i64>
Returns the remaining time to live of a key that has a timeout. Read more
Source§fn randomkey<R>(&mut self) -> PreparedCommand<'_, Self, R>
fn randomkey<R>(&mut self) -> PreparedCommand<'_, Self, R>
Return a random key from the currently selected database. Read more
Source§fn rename<K1, K2>(
&mut self,
key: K1,
new_key: K2,
) -> PreparedCommand<'_, Self, ()>
fn rename<K1, K2>( &mut self, key: K1, new_key: K2, ) -> PreparedCommand<'_, Self, ()>
Renames key to newkey. Read more
Source§fn renamenx<K1, K2>(
&mut self,
key: K1,
new_key: K2,
) -> PreparedCommand<'_, Self, bool>
fn renamenx<K1, K2>( &mut self, key: K1, new_key: K2, ) -> PreparedCommand<'_, Self, bool>
Renames key to newkey if newkey does not yet exist.
It returns an error when key does not exist. Read more
Source§fn restore<K>(
&mut self,
key: K,
ttl: u64,
serialized_value: Vec<u8>,
options: RestoreOptions,
) -> PreparedCommand<'_, Self, ()>
fn restore<K>( &mut self, key: K, ttl: u64, serialized_value: Vec<u8>, options: RestoreOptions, ) -> PreparedCommand<'_, Self, ()>
Create a key associated with a value that is obtained by deserializing
the provided serialized value (obtained via DUMP). Read more
Source§fn scan<K, A>(
&mut self,
cursor: u64,
options: ScanOptions,
) -> PreparedCommand<'_, Self, (u64, A)>
fn scan<K, A>( &mut self, cursor: u64, options: ScanOptions, ) -> PreparedCommand<'_, Self, (u64, A)>
Iterates the set of keys in the currently selected Redis database. Read more
Source§fn sort<K, M, A>(
&mut self,
key: K,
options: SortOptions,
) -> PreparedCommand<'_, Self, A>
fn sort<K, M, A>( &mut self, key: K, options: SortOptions, ) -> PreparedCommand<'_, Self, A>
Returns the elements contained in the list, set or sorted set at key. Read more
Source§fn sort_and_store<K, D>(
&mut self,
key: K,
destination: D,
options: SortOptions,
) -> PreparedCommand<'_, Self, usize>
fn sort_and_store<K, D>( &mut self, key: K, destination: D, options: SortOptions, ) -> PreparedCommand<'_, Self, usize>
Stores the elements contained in the list, set or sorted set at key. Read more
Source§fn sort_readonly<K, M, A>(
&mut self,
key: K,
options: SortOptions,
) -> PreparedCommand<'_, Self, A>
fn sort_readonly<K, M, A>( &mut self, key: K, options: SortOptions, ) -> PreparedCommand<'_, Self, A>
Read-only variant of the SORT command. Read more
Source§fn touch<K, KK>(&mut self, keys: KK) -> PreparedCommand<'_, Self, usize>
fn touch<K, KK>(&mut self, keys: KK) -> PreparedCommand<'_, Self, usize>
Alters the last access time of a key(s). A key is ignored if it does not exist. Read more
Source§fn ttl<K>(&mut self, key: K) -> PreparedCommand<'_, Self, i64>
fn ttl<K>(&mut self, key: K) -> PreparedCommand<'_, Self, i64>
Returns the remaining time to live of a key that has a timeout. Read more
Source§fn type_<K>(&mut self, key: K) -> PreparedCommand<'_, Self, String>
fn type_<K>(&mut self, key: K) -> PreparedCommand<'_, Self, String>
Returns the string representation of the type of the value stored at key. Read more
Source§impl GeoCommands for Transaction
impl GeoCommands for Transaction
Source§fn geoadd<K, M, I>(
&mut self,
key: K,
condition: GeoAddCondition,
change: bool,
items: I,
) -> PreparedCommand<'_, Self, usize>
fn geoadd<K, M, I>( &mut self, key: K, condition: GeoAddCondition, change: bool, items: I, ) -> PreparedCommand<'_, Self, usize>
Adds the specified geospatial items (longitude, latitude, name) to the specified key. Read more
Source§fn geodist<K, M>(
&mut self,
key: K,
member1: M,
member2: M,
unit: GeoUnit,
) -> PreparedCommand<'_, Self, Option<f64>>
fn geodist<K, M>( &mut self, key: K, member1: M, member2: M, unit: GeoUnit, ) -> PreparedCommand<'_, Self, Option<f64>>
Return the distance between two members in the geospatial index
represented by the sorted set. Read more
Source§fn geohash<K, M, C>(
&mut self,
key: K,
members: C,
) -> PreparedCommand<'_, Self, Vec<String>>
fn geohash<K, M, C>( &mut self, key: K, members: C, ) -> PreparedCommand<'_, Self, Vec<String>>
Source§fn geopos<K, M, C>(
&mut self,
key: K,
members: C,
) -> PreparedCommand<'_, Self, Vec<Option<(f64, f64)>>>
fn geopos<K, M, C>( &mut self, key: K, members: C, ) -> PreparedCommand<'_, Self, Vec<Option<(f64, f64)>>>
Return the positions (longitude,latitude) of all the specified members
of the geospatial index represented by the sorted set at key. Read more
Source§fn geosearch<K, M1, M2, A>(
&mut self,
key: K,
from: GeoSearchFrom<M1>,
by: GeoSearchBy,
options: GeoSearchOptions,
) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<CommandArg>,
M1: Into<CommandArg>,
M2: FromValue,
A: FromSingleValueArray<GeoSearchResult<M2>>,
fn geosearch<K, M1, M2, A>(
&mut self,
key: K,
from: GeoSearchFrom<M1>,
by: GeoSearchBy,
options: GeoSearchOptions,
) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<CommandArg>,
M1: Into<CommandArg>,
M2: FromValue,
A: FromSingleValueArray<GeoSearchResult<M2>>,
Source§fn geosearchstore<D, S, M>(
&mut self,
destination: D,
source: S,
from: GeoSearchFrom<M>,
by: GeoSearchBy,
options: GeoSearchStoreOptions,
) -> PreparedCommand<'_, Self, usize>
fn geosearchstore<D, S, M>( &mut self, destination: D, source: S, from: GeoSearchFrom<M>, by: GeoSearchBy, options: GeoSearchStoreOptions, ) -> PreparedCommand<'_, Self, usize>
Source§impl HashCommands for Transaction
impl HashCommands for Transaction
Source§fn hdel<K, F, C>(
&mut self,
key: K,
fields: C,
) -> PreparedCommand<'_, Self, usize>
fn hdel<K, F, C>( &mut self, key: K, fields: C, ) -> PreparedCommand<'_, Self, usize>
Removes the specified fields from the hash stored at key. Read more
Source§fn hexists<K, F>(&mut self, key: K, field: F) -> PreparedCommand<'_, Self, bool>
fn hexists<K, F>(&mut self, key: K, field: F) -> PreparedCommand<'_, Self, bool>
Returns if field is an existing field in the hash stored at key. Read more
Source§fn hget<K, F, V>(&mut self, key: K, field: F) -> PreparedCommand<'_, Self, V>
fn hget<K, F, V>(&mut self, key: K, field: F) -> PreparedCommand<'_, Self, V>
Returns the value associated with field in the hash stored at key. Read more
Source§fn hgetall<K, F, V, A>(&mut self, key: K) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<CommandArg>,
F: FromValue,
V: FromValue,
A: FromKeyValueValueArray<F, V>,
fn hgetall<K, F, V, A>(&mut self, key: K) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<CommandArg>,
F: FromValue,
V: FromValue,
A: FromKeyValueValueArray<F, V>,
Returns all fields and values of the hash stored at key. Read more
Source§fn hincrby<K, F>(
&mut self,
key: K,
field: F,
increment: i64,
) -> PreparedCommand<'_, Self, i64>
fn hincrby<K, F>( &mut self, key: K, field: F, increment: i64, ) -> PreparedCommand<'_, Self, i64>
Increments the number stored at field in the hash stored at key by increment. Read more
Source§fn hincrbyfloat<K, F>(
&mut self,
key: K,
field: F,
increment: f64,
) -> PreparedCommand<'_, Self, f64>
fn hincrbyfloat<K, F>( &mut self, key: K, field: F, increment: f64, ) -> PreparedCommand<'_, Self, f64>
Increment the specified field of a hash stored at key,
and representing a floating point number, by the specified increment. Read more
Source§fn hkeys<K, F, A>(&mut self, key: K) -> PreparedCommand<'_, Self, A>
fn hkeys<K, F, A>(&mut self, key: K) -> PreparedCommand<'_, Self, A>
Returns all field names in the hash stored at key. Read more
Source§fn hlen<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>
fn hlen<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>
Returns the number of fields contained in the hash stored at key. Read more
Source§fn hmget<K, F, V, C, A>(
&mut self,
key: K,
fields: C,
) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<CommandArg>,
F: Into<CommandArg>,
C: SingleArgOrCollection<F>,
V: FromValue,
A: FromSingleValueArray<V>,
fn hmget<K, F, V, C, A>(
&mut self,
key: K,
fields: C,
) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<CommandArg>,
F: Into<CommandArg>,
C: SingleArgOrCollection<F>,
V: FromValue,
A: FromSingleValueArray<V>,
Returns the values associated with the specified fields in the hash stored at key. Read more
Source§fn hrandfield<K, F>(&mut self, key: K) -> PreparedCommand<'_, Self, F>
fn hrandfield<K, F>(&mut self, key: K) -> PreparedCommand<'_, Self, F>
return random fields from the hash value stored at key. Read more
Source§fn hrandfields<K, F, A>(
&mut self,
key: K,
count: isize,
) -> PreparedCommand<'_, Self, A>
fn hrandfields<K, F, A>( &mut self, key: K, count: isize, ) -> PreparedCommand<'_, Self, A>
return random fields from the hash value stored at key. Read more
Source§fn hrandfields_with_values<K, F, V, A>(
&mut self,
key: K,
count: isize,
) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<CommandArg>,
F: FromValue,
V: FromValue,
A: FromKeyValueValueArray<F, V>,
fn hrandfields_with_values<K, F, V, A>(
&mut self,
key: K,
count: isize,
) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<CommandArg>,
F: FromValue,
V: FromValue,
A: FromKeyValueValueArray<F, V>,
return random fields from the hash value stored at key. Read more
Source§fn hscan<K, F, V>(
&mut self,
key: K,
cursor: u64,
options: HScanOptions,
) -> PreparedCommand<'_, Self, (u64, Vec<(F, V)>)>
fn hscan<K, F, V>( &mut self, key: K, cursor: u64, options: HScanOptions, ) -> PreparedCommand<'_, Self, (u64, Vec<(F, V)>)>
Iterates fields of Hash types and their associated values. Read more
Source§fn hset<K, F, V, I>(
&mut self,
key: K,
items: I,
) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
K: Into<CommandArg>,
F: Into<CommandArg>,
V: Into<CommandArg>,
I: KeyValueArgOrCollection<F, V>,
fn hset<K, F, V, I>(
&mut self,
key: K,
items: I,
) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
K: Into<CommandArg>,
F: Into<CommandArg>,
V: Into<CommandArg>,
I: KeyValueArgOrCollection<F, V>,
Sets field in the hash stored at key to value. Read more
Source§fn hsetnx<K, F, V>(
&mut self,
key: K,
field: F,
value: V,
) -> PreparedCommand<'_, Self, bool>
fn hsetnx<K, F, V>( &mut self, key: K, field: F, value: V, ) -> PreparedCommand<'_, Self, bool>
Sets field in the hash stored at key to value, only if field does not yet exist. Read more
Source§fn hstrlen<K, F>(
&mut self,
key: K,
field: F,
) -> PreparedCommand<'_, Self, usize>
fn hstrlen<K, F>( &mut self, key: K, field: F, ) -> PreparedCommand<'_, Self, usize>
Returns the string length of the value associated with field in the hash stored at key. Read more
Source§fn hvals<K, V, A>(&mut self, key: K) -> PreparedCommand<'_, Self, A>
fn hvals<K, V, A>(&mut self, key: K) -> PreparedCommand<'_, Self, A>
list of values in the hash, or an empty list when key does not exist. Read more
Source§impl HyperLogLogCommands for Transaction
impl HyperLogLogCommands for Transaction
Source§fn pfadd<K, E, EE>(
&mut self,
key: K,
elements: EE,
) -> PreparedCommand<'_, Self, bool>
fn pfadd<K, E, EE>( &mut self, key: K, elements: EE, ) -> PreparedCommand<'_, Self, bool>
Adds the specified elements to the specified HyperLogLog. Read more
Source§fn pfcount<K, KK>(&mut self, keys: KK) -> PreparedCommand<'_, Self, usize>
fn pfcount<K, KK>(&mut self, keys: KK) -> PreparedCommand<'_, Self, usize>
Return the approximated cardinality of the set(s)
observed by the HyperLogLog at key(s). Read more
Source§impl ListCommands for Transaction
impl ListCommands for Transaction
Source§fn lindex<K, E>(&mut self, key: K, index: isize) -> PreparedCommand<'_, Self, E>
fn lindex<K, E>(&mut self, key: K, index: isize) -> PreparedCommand<'_, Self, E>
Returns the element at index index in the list stored at key. Read more
Source§fn linsert<K, E>(
&mut self,
key: K,
where_: LInsertWhere,
pivot: E,
element: E,
) -> PreparedCommand<'_, Self, usize>
fn linsert<K, E>( &mut self, key: K, where_: LInsertWhere, pivot: E, element: E, ) -> PreparedCommand<'_, Self, usize>
Inserts element in the list stored at key either before or after the reference value pivot. Read more
Source§fn llen<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>
fn llen<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>
Inserts element in the list stored at key either before or after the reference value pivot. Read more
Source§fn lmove<S, D, E>(
&mut self,
source: S,
destination: D,
where_from: LMoveWhere,
where_to: LMoveWhere,
) -> PreparedCommand<'_, Self, E>
fn lmove<S, D, E>( &mut self, source: S, destination: D, where_from: LMoveWhere, where_to: LMoveWhere, ) -> PreparedCommand<'_, Self, E>
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
Source§fn lmpop<K, E, C>(
&mut self,
keys: C,
where_: LMoveWhere,
count: usize,
) -> PreparedCommand<'_, Self, (String, Vec<E>)>
fn lmpop<K, E, C>( &mut self, keys: C, where_: LMoveWhere, count: usize, ) -> PreparedCommand<'_, Self, (String, Vec<E>)>
Pops one or more elements from the first non-empty list key from the list of provided key names. Read more
Source§fn lpop<K, E, A>(
&mut self,
key: K,
count: usize,
) -> PreparedCommand<'_, Self, A>
fn lpop<K, E, A>( &mut self, key: K, count: usize, ) -> PreparedCommand<'_, Self, A>
Removes and returns the first elements of the list stored at key. Read more
Source§fn lpos<K, E>(
&mut self,
key: K,
element: E,
rank: Option<usize>,
max_len: Option<usize>,
) -> PreparedCommand<'_, Self, Option<usize>>
fn lpos<K, E>( &mut self, key: K, element: E, rank: Option<usize>, max_len: Option<usize>, ) -> PreparedCommand<'_, Self, Option<usize>>
Returns the index of matching elements inside a Redis list. Read more
Source§fn lpos_with_count<K, E, A>(
&mut self,
key: K,
element: E,
num_matches: usize,
rank: Option<usize>,
max_len: Option<usize>,
) -> PreparedCommand<'_, Self, A>
fn lpos_with_count<K, E, A>( &mut self, key: K, element: E, num_matches: usize, rank: Option<usize>, max_len: Option<usize>, ) -> PreparedCommand<'_, Self, A>
Returns the index of matching elements inside a Redis list. Read more
Source§fn lpush<K, E, C>(
&mut self,
key: K,
elements: C,
) -> PreparedCommand<'_, Self, usize>
fn lpush<K, E, C>( &mut self, key: K, elements: C, ) -> PreparedCommand<'_, Self, usize>
Insert all the specified values at the head of the list stored at key Read more
Source§fn lpushx<K, E, C>(
&mut self,
key: K,
elements: C,
) -> PreparedCommand<'_, Self, usize>
fn lpushx<K, E, C>( &mut self, key: K, elements: C, ) -> PreparedCommand<'_, Self, usize>
Inserts specified values at the head of the list stored at key,
only if key already exists and holds a list. Read more
Source§fn lrange<K, E, A>(
&mut self,
key: K,
start: isize,
stop: isize,
) -> PreparedCommand<'_, Self, A>
fn lrange<K, E, A>( &mut self, key: K, start: isize, stop: isize, ) -> PreparedCommand<'_, Self, A>
Returns the specified elements of the list stored at key. Read more
Source§fn lrem<K, E>(
&mut self,
key: K,
count: isize,
element: E,
) -> PreparedCommand<'_, Self, usize>
fn lrem<K, E>( &mut self, key: K, count: isize, element: E, ) -> PreparedCommand<'_, Self, usize>
Removes the first count occurrences of elements equal to element from the list stored at key. Read more
Source§fn lset<K, E>(
&mut self,
key: K,
index: isize,
element: E,
) -> PreparedCommand<'_, Self, ()>
fn lset<K, E>( &mut self, key: K, index: isize, element: E, ) -> PreparedCommand<'_, Self, ()>
Sets the list element at index to element. Read more
Source§fn ltrim<K>(
&mut self,
key: K,
start: isize,
stop: isize,
) -> PreparedCommand<'_, Self, ()>
fn ltrim<K>( &mut self, key: K, start: isize, stop: isize, ) -> PreparedCommand<'_, Self, ()>
Trim an existing list so that it will contain only the specified range of elements specified. Read more
Source§fn rpop<K, E, C>(
&mut self,
key: K,
count: usize,
) -> PreparedCommand<'_, Self, C>
fn rpop<K, E, C>( &mut self, key: K, count: usize, ) -> PreparedCommand<'_, Self, C>
Removes and returns the first elements of the list stored at key. Read more
Source§fn rpush<K, E, C>(
&mut self,
key: K,
elements: C,
) -> PreparedCommand<'_, Self, usize>
fn rpush<K, E, C>( &mut self, key: K, elements: C, ) -> PreparedCommand<'_, Self, usize>
Insert all the specified values at the tail of the list stored at key Read more
Source§impl ScriptingCommands for Transaction
impl ScriptingCommands for Transaction
Source§fn eval<R>(&mut self, builder: CallBuilder) -> PreparedCommand<'_, Self, R>
fn eval<R>(&mut self, builder: CallBuilder) -> PreparedCommand<'_, Self, R>
Invoke the execution of a server-side Lua script. Read more
Source§fn eval_readonly<R>(
&mut self,
builder: CallBuilder,
) -> PreparedCommand<'_, Self, R>
fn eval_readonly<R>( &mut self, builder: CallBuilder, ) -> PreparedCommand<'_, Self, R>
Source§fn evalsha<R>(&mut self, builder: CallBuilder) -> PreparedCommand<'_, Self, R>
fn evalsha<R>(&mut self, builder: CallBuilder) -> PreparedCommand<'_, Self, R>
Evaluate a script from the server’s cache by its SHA1 digest. Read more
Source§fn evalsha_readonly<R>(
&mut self,
builder: CallBuilder,
) -> PreparedCommand<'_, Self, R>
fn evalsha_readonly<R>( &mut self, builder: CallBuilder, ) -> PreparedCommand<'_, Self, R>
Source§fn fcall<R>(&mut self, builder: CallBuilder) -> PreparedCommand<'_, Self, R>
fn fcall<R>(&mut self, builder: CallBuilder) -> PreparedCommand<'_, Self, R>
Invoke a function. Read more
Source§fn fcall_readonly<R>(
&mut self,
builder: CallBuilder,
) -> PreparedCommand<'_, Self, R>
fn fcall_readonly<R>( &mut self, builder: CallBuilder, ) -> PreparedCommand<'_, Self, R>
Invoke a function. Read more
Source§fn function_delete<L>(
&mut self,
library_name: L,
) -> PreparedCommand<'_, Self, ()>
fn function_delete<L>( &mut self, library_name: L, ) -> PreparedCommand<'_, Self, ()>
Delete a library and all its functions. Read more
Source§fn function_dump<P>(&mut self) -> PreparedCommand<'_, Self, P>
fn function_dump<P>(&mut self) -> PreparedCommand<'_, Self, P>
Return the serialized payload of loaded libraries.
You can restore the serialized payload later with the
function_restore
command. Read moreSource§fn function_flush(
&mut self,
flushing_mode: FlushingMode,
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn function_flush(
&mut self,
flushing_mode: FlushingMode,
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
Deletes all the libraries. Read more
Source§fn function_kill(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn function_kill(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
Kill a function that is currently executing. Read more
Source§fn function_list(
&mut self,
options: FunctionListOptions,
) -> PreparedCommand<'_, Self, Vec<LibraryInfo>>where
Self: Sized,
fn function_list(
&mut self,
options: FunctionListOptions,
) -> PreparedCommand<'_, Self, Vec<LibraryInfo>>where
Self: Sized,
Return information about the functions and libraries. Read more
Source§fn function_load<F, L>(
&mut self,
replace: bool,
function_code: F,
) -> PreparedCommand<'_, Self, L>
fn function_load<F, L>( &mut self, replace: bool, function_code: F, ) -> PreparedCommand<'_, Self, L>
Load a library to Redis. Read more
Source§fn function_restore<P>(
&mut self,
serialized_payload: P,
policy: FunctionRestorePolicy,
) -> PreparedCommand<'_, Self, ()>
fn function_restore<P>( &mut self, serialized_payload: P, policy: FunctionRestorePolicy, ) -> PreparedCommand<'_, Self, ()>
Restore libraries from the serialized payload. Read more
Source§fn function_stats(&mut self) -> PreparedCommand<'_, Self, FunctionStats>where
Self: Sized,
fn function_stats(&mut self) -> PreparedCommand<'_, Self, FunctionStats>where
Self: Sized,
Return information about the function that’s currently running and information about the available execution engines. Read more
Source§fn script_debug(
&mut self,
debug_mode: ScriptDebugMode,
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn script_debug(
&mut self,
debug_mode: ScriptDebugMode,
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
Set the debug mode for subsequent scripts executed with EVAL. Read more
Source§fn script_exists<S, C>(
&mut self,
sha1s: C,
) -> PreparedCommand<'_, Self, Vec<bool>>
fn script_exists<S, C>( &mut self, sha1s: C, ) -> PreparedCommand<'_, Self, Vec<bool>>
Returns information about the existence of the scripts in the script cache. Read more
Source§fn script_flush(
&mut self,
flushing_mode: FlushingMode,
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn script_flush(
&mut self,
flushing_mode: FlushingMode,
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
Flush the Lua scripts cache. Read more
Source§fn script_kill(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn script_kill(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
Kills the currently executing EVAL script,
assuming no write operation was yet performed by the script. Read more
Source§fn script_load<S, V>(&mut self, script: S) -> PreparedCommand<'_, Self, V>
fn script_load<S, V>(&mut self, script: S) -> PreparedCommand<'_, Self, V>
Load a script into the scripts cache, without executing it. Read more
Source§impl ServerCommands for Transaction
impl ServerCommands for Transaction
Source§fn acl_cat<C, CC>(
&mut self,
options: AclCatOptions,
) -> PreparedCommand<'_, Self, CC>
fn acl_cat<C, CC>( &mut self, options: AclCatOptions, ) -> PreparedCommand<'_, Self, CC>
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
Source§fn acl_deluser<U, UU>(
&mut self,
usernames: UU,
) -> PreparedCommand<'_, Self, usize>
fn acl_deluser<U, UU>( &mut self, usernames: UU, ) -> PreparedCommand<'_, Self, usize>
Delete all the specified ACL users and terminate all
the connections that are authenticated with such users. Read more
Source§fn acl_dryrun<U, C, R>(
&mut self,
username: U,
command: C,
options: AclDryRunOptions,
) -> PreparedCommand<'_, Self, R>
fn acl_dryrun<U, C, R>( &mut self, username: U, command: C, options: AclDryRunOptions, ) -> PreparedCommand<'_, Self, R>
Simulate the execution of a given command by a given user. Read more
Source§fn acl_genpass<R: FromValue>(
&mut self,
options: AclGenPassOptions,
) -> PreparedCommand<'_, Self, R>where
Self: Sized,
fn acl_genpass<R: FromValue>(
&mut self,
options: AclGenPassOptions,
) -> PreparedCommand<'_, Self, R>where
Self: Sized,
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
Source§fn acl_getuser<U, RR>(&mut self, username: U) -> PreparedCommand<'_, Self, RR>
fn acl_getuser<U, RR>(&mut self, username: U) -> PreparedCommand<'_, Self, RR>
The command returns all the rules defined for an existing ACL user. Read more
Source§fn acl_list(&mut self) -> PreparedCommand<'_, Self, Vec<String>>where
Self: Sized,
fn acl_list(&mut self) -> PreparedCommand<'_, Self, Vec<String>>where
Self: Sized,
The command shows the currently active ACL rules in the Redis server. Read more
Source§fn acl_load(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn acl_load(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
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
Source§fn acl_log<EE>(
&mut self,
options: AclLogOptions,
) -> PreparedCommand<'_, Self, Vec<EE>>
fn acl_log<EE>( &mut self, options: AclLogOptions, ) -> PreparedCommand<'_, Self, Vec<EE>>
The command shows a list of recent ACL security events Read more
Source§fn acl_save(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn acl_save(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
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
Source§fn acl_setuser<U, R, RR>(
&mut self,
username: U,
rules: RR,
) -> PreparedCommand<'_, Self, ()>
fn acl_setuser<U, R, RR>( &mut self, username: U, rules: RR, ) -> PreparedCommand<'_, Self, ()>
Create an ACL user with the specified rules or modify the rules of an existing user. Read more
Source§fn acl_users<U, UU>(&mut self) -> PreparedCommand<'_, Self, UU>
fn acl_users<U, UU>(&mut self) -> PreparedCommand<'_, Self, UU>
The command shows a list of all the usernames of the currently configured users in the Redis ACL system. Read more
Source§fn acl_whoami<U: FromValue>(&mut self) -> PreparedCommand<'_, Self, U>where
Self: Sized,
fn acl_whoami<U: FromValue>(&mut self) -> PreparedCommand<'_, Self, U>where
Self: Sized,
Return the username the current connection is authenticated with. Read more
Source§fn command(&mut self) -> PreparedCommand<'_, Self, Vec<CommandInfo>>where
Self: Sized,
fn command(&mut self) -> PreparedCommand<'_, Self, Vec<CommandInfo>>where
Self: Sized,
Return an array with details about every Redis command. Read more
Source§fn command_count(&mut self) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
fn command_count(&mut self) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
Number of total commands in this Redis server. Read more
Source§fn command_docs<N, NN, DD>(
&mut self,
command_names: NN,
) -> PreparedCommand<'_, Self, DD>where
Self: Sized,
N: Into<CommandArg>,
NN: SingleArgOrCollection<N>,
DD: FromKeyValueValueArray<String, CommandDoc>,
fn command_docs<N, NN, DD>(
&mut self,
command_names: NN,
) -> PreparedCommand<'_, Self, DD>where
Self: Sized,
N: Into<CommandArg>,
NN: SingleArgOrCollection<N>,
DD: FromKeyValueValueArray<String, CommandDoc>,
Number of total commands in this Redis server. Read more
Source§fn command_getkeys<A, AA, KK>(
&mut self,
args: AA,
) -> PreparedCommand<'_, Self, KK>where
Self: Sized,
A: Into<CommandArg>,
AA: SingleArgOrCollection<A>,
KK: FromSingleValueArray<String>,
fn command_getkeys<A, AA, KK>(
&mut self,
args: AA,
) -> PreparedCommand<'_, Self, KK>where
Self: Sized,
A: Into<CommandArg>,
AA: SingleArgOrCollection<A>,
KK: FromSingleValueArray<String>,
A helper command to let you find the keys from a full Redis command. Read more
Source§fn command_getkeysandflags<A, AA, KK>(
&mut self,
args: AA,
) -> PreparedCommand<'_, Self, KK>where
Self: Sized,
A: Into<CommandArg>,
AA: SingleArgOrCollection<A>,
KK: FromKeyValueValueArray<String, Vec<String>>,
fn command_getkeysandflags<A, AA, KK>(
&mut self,
args: AA,
) -> PreparedCommand<'_, Self, KK>where
Self: Sized,
A: Into<CommandArg>,
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
Source§fn command_info<N, NN>(
&mut self,
command_names: NN,
) -> PreparedCommand<'_, Self, Vec<CommandInfo>>
fn command_info<N, NN>( &mut self, command_names: NN, ) -> PreparedCommand<'_, Self, Vec<CommandInfo>>
Return an array with details about multiple Redis command. Read more
Source§fn command_list<CC>(
&mut self,
options: CommandListOptions,
) -> PreparedCommand<'_, Self, CC>
fn command_list<CC>( &mut self, options: CommandListOptions, ) -> PreparedCommand<'_, Self, CC>
Return an array of the server’s command names based on optional filters Read more
Source§fn config_get<P, PP, V, VV>(
&mut self,
params: PP,
) -> PreparedCommand<'_, Self, VV>where
Self: Sized,
P: Into<CommandArg>,
PP: SingleArgOrCollection<P>,
V: FromValue,
VV: FromKeyValueValueArray<String, V>,
fn config_get<P, PP, V, VV>(
&mut self,
params: PP,
) -> PreparedCommand<'_, Self, VV>where
Self: Sized,
P: Into<CommandArg>,
PP: SingleArgOrCollection<P>,
V: FromValue,
VV: FromKeyValueValueArray<String, V>,
Used to read the configuration parameters of a running Redis server. Read more
Source§fn config_resetstat(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn config_resetstat(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
Source§fn config_rewrite(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn config_rewrite(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
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 moreSource§fn config_set<P, V, C>(&mut self, configs: C) -> PreparedCommand<'_, Self, ()>
fn config_set<P, V, C>(&mut self, configs: C) -> PreparedCommand<'_, Self, ()>
Used in order to reconfigure the server at run time without the need to restart Redis. Read more
Source§fn dbsize(&mut self) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
fn dbsize(&mut self) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
Return the number of keys in the currently-selected database. Read more
Source§fn failover(
&mut self,
options: FailOverOptions,
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn failover(
&mut self,
options: FailOverOptions,
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
This command will start a coordinated failover between
the currently-connected-to master and one of its replicas. Read more
Source§fn flushdb(
&mut self,
flushing_mode: FlushingMode,
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn flushdb(
&mut self,
flushing_mode: FlushingMode,
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
Delete all the keys of the currently selected DB. Read more
Source§fn flushall(
&mut self,
flushing_mode: FlushingMode,
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn flushall(
&mut self,
flushing_mode: FlushingMode,
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
Delete all the keys of all the existing databases, not just the currently selected one. Read more
Source§fn info<SS>(&mut self, sections: SS) -> PreparedCommand<'_, Self, String>
fn info<SS>(&mut self, sections: SS) -> PreparedCommand<'_, Self, String>
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
Source§fn lastsave(&mut self) -> PreparedCommand<'_, Self, u64>where
Self: Sized,
fn lastsave(&mut self) -> PreparedCommand<'_, Self, u64>where
Self: Sized,
Return the UNIX TIME of the last DB save executed with success. Read more
Source§fn latency_doctor(&mut self) -> PreparedCommand<'_, Self, String>where
Self: Sized,
fn latency_doctor(&mut self) -> PreparedCommand<'_, Self, String>where
Self: Sized,
This command reports about different latency-related issues and advises about possible remedies. Read more
Source§fn latency_graph(
&mut self,
event: LatencyHistoryEvent,
) -> PreparedCommand<'_, Self, String>where
Self: Sized,
fn latency_graph(
&mut self,
event: LatencyHistoryEvent,
) -> PreparedCommand<'_, Self, String>where
Self: Sized,
Produces an ASCII-art style graph for the specified event. Read more
Source§fn latency_histogram<C, CC, RR>(
&mut self,
commands: CC,
) -> PreparedCommand<'_, Self, RR>where
Self: Sized,
C: Into<CommandArg>,
CC: SingleArgOrCollection<C>,
RR: FromKeyValueValueArray<String, CommandHistogram>,
fn latency_histogram<C, CC, RR>(
&mut self,
commands: CC,
) -> PreparedCommand<'_, Self, RR>where
Self: Sized,
C: Into<CommandArg>,
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
Source§fn latency_history<RR>(
&mut self,
event: LatencyHistoryEvent,
) -> PreparedCommand<'_, Self, RR>
fn latency_history<RR>( &mut self, event: LatencyHistoryEvent, ) -> PreparedCommand<'_, Self, RR>
This command returns the raw data of the event’s latency spikes time series. Read more
Source§fn latency_latest<RR>(&mut self) -> PreparedCommand<'_, Self, RR>
fn latency_latest<RR>(&mut self) -> PreparedCommand<'_, Self, RR>
This command reports the latest latency events logged. Read more
Source§fn latency_reset<EE>(&mut self, events: EE) -> PreparedCommand<'_, Self, usize>
fn latency_reset<EE>(&mut self, events: EE) -> PreparedCommand<'_, Self, usize>
This command resets the latency spikes time series of all, or only some, events. Read more
Source§fn lolwut(
&mut self,
options: LolWutOptions,
) -> PreparedCommand<'_, Self, String>where
Self: Sized,
fn lolwut(
&mut self,
options: LolWutOptions,
) -> PreparedCommand<'_, Self, String>where
Self: Sized,
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
Source§fn memory_doctor(&mut self) -> PreparedCommand<'_, Self, String>where
Self: Sized,
fn memory_doctor(&mut self) -> PreparedCommand<'_, Self, String>where
Self: Sized,
This command reports about different memory-related issues that
the Redis server experiences, and advises about possible remedies. Read more
Source§fn memory_malloc_stats(&mut self) -> PreparedCommand<'_, Self, String>where
Self: Sized,
fn memory_malloc_stats(&mut self) -> PreparedCommand<'_, Self, String>where
Self: Sized,
This command provides an internal statistics report from the memory allocator. Read more
Source§fn memory_purge(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn memory_purge(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
This command attempts to purge dirty pages so these can be reclaimed by the allocator. Read more
Source§fn memory_stats(&mut self) -> PreparedCommand<'_, Self, MemoryStats>where
Self: Sized,
fn memory_stats(&mut self) -> PreparedCommand<'_, Self, MemoryStats>where
Self: Sized,
This command returns information about the memory usage of the server. Read more
Source§fn memory_usage<K>(
&mut self,
key: K,
options: MemoryUsageOptions,
) -> PreparedCommand<'_, Self, Option<usize>>
fn memory_usage<K>( &mut self, key: K, options: MemoryUsageOptions, ) -> PreparedCommand<'_, Self, Option<usize>>
This command reports the number of bytes that a key and its value require to be stored in RAM. Read more
Source§fn module_list<MM>(&mut self) -> PreparedCommand<'_, Self, MM>
fn module_list<MM>(&mut self) -> PreparedCommand<'_, Self, MM>
Returns information about the modules loaded to the server. Read more
Source§fn module_load<P>(
&mut self,
path: P,
options: ModuleLoadOptions,
) -> PreparedCommand<'_, Self, ()>
fn module_load<P>( &mut self, path: P, options: ModuleLoadOptions, ) -> PreparedCommand<'_, Self, ()>
Loads a module from a dynamic library at runtime. Read more
Source§fn module_unload<N>(&mut self, name: N) -> PreparedCommand<'_, Self, ()>
fn module_unload<N>(&mut self, name: N) -> PreparedCommand<'_, Self, ()>
Unloads a module. Read more
Source§fn replicaof(
&mut self,
options: ReplicaOfOptions,
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn replicaof(
&mut self,
options: ReplicaOfOptions,
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
This command can change the replication settings of a replica on the fly. Read more
Source§fn role(&mut self) -> PreparedCommand<'_, Self, RoleResult>where
Self: Sized,
fn role(&mut self) -> PreparedCommand<'_, Self, RoleResult>where
Self: Sized,
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 moreSource§fn save(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn save(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
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
Source§fn shutdown(
&mut self,
options: ShutdownOptions,
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn shutdown(
&mut self,
options: ShutdownOptions,
) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
Shutdown the server Read more
Source§fn slowlog_get(
&mut self,
options: SlowLogOptions,
) -> PreparedCommand<'_, Self, Vec<SlowLogEntry>>where
Self: Sized,
fn slowlog_get(
&mut self,
options: SlowLogOptions,
) -> PreparedCommand<'_, Self, Vec<SlowLogEntry>>where
Self: Sized,
This command returns entries from the slow log in chronological order. Read more
Source§fn slowlog_len(&mut self) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
fn slowlog_len(&mut self) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
This command returns the current number of entries in the slow log. Read more
Source§fn slowlog_reset(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
fn slowlog_reset(&mut self) -> PreparedCommand<'_, Self, ()>where
Self: Sized,
This command resets the slow log, clearing all entries in it. Read more
Source§impl SetCommands for Transaction
impl SetCommands for Transaction
Source§fn sadd<K, M, C>(
&mut self,
key: K,
members: C,
) -> PreparedCommand<'_, Self, usize>
fn sadd<K, M, C>( &mut self, key: K, members: C, ) -> PreparedCommand<'_, Self, usize>
Add the specified members to the set stored at key. Read more
Source§fn scard<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>
fn scard<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>
Returns the set cardinality (number of elements) of the set stored at key. Read more
Source§fn sdiff<K, M, C, A>(&mut self, keys: C) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<CommandArg>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
A: FromSingleValueArray<M>,
fn sdiff<K, M, C, A>(&mut self, keys: C) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<CommandArg>,
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
Source§fn sdiffstore<D, K, C>(
&mut self,
destination: D,
keys: C,
) -> PreparedCommand<'_, Self, usize>
fn sdiffstore<D, K, C>( &mut self, destination: D, keys: C, ) -> PreparedCommand<'_, Self, usize>
Source§fn sinter<K, M, C, A>(&mut self, keys: C) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<CommandArg>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
A: FromSingleValueArray<M>,
fn sinter<K, M, C, A>(&mut self, keys: C) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<CommandArg>,
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
Source§fn sintercard<K, C>(
&mut self,
keys: C,
limit: usize,
) -> PreparedCommand<'_, Self, usize>
fn sintercard<K, C>( &mut self, keys: C, limit: usize, ) -> PreparedCommand<'_, Self, usize>
Source§fn sinterstore<D, K, C>(
&mut self,
destination: D,
keys: C,
) -> PreparedCommand<'_, Self, usize>
fn sinterstore<D, K, C>( &mut self, destination: D, keys: C, ) -> PreparedCommand<'_, Self, usize>
Source§fn sismember<K, M>(
&mut self,
key: K,
member: M,
) -> PreparedCommand<'_, Self, bool>
fn sismember<K, M>( &mut self, key: K, member: M, ) -> PreparedCommand<'_, Self, bool>
Returns if member is a member of the set stored at key. Read more
Source§fn smembers<K, M, A>(&mut self, key: K) -> PreparedCommand<'_, Self, A>
fn smembers<K, M, A>(&mut self, key: K) -> PreparedCommand<'_, Self, A>
Returns all the members of the set value stored at key. Read more
Source§fn smismember<K, M, C>(
&mut self,
key: K,
members: C,
) -> PreparedCommand<'_, Self, Vec<bool>>
fn smismember<K, M, C>( &mut self, key: K, members: C, ) -> PreparedCommand<'_, Self, Vec<bool>>
Returns whether each member is a member of the set stored at key. Read more
Source§fn smove<S, D, M>(
&mut self,
source: S,
destination: D,
member: M,
) -> PreparedCommand<'_, Self, bool>
fn smove<S, D, M>( &mut self, source: S, destination: D, member: M, ) -> PreparedCommand<'_, Self, bool>
Move member from the set at source to the set at destination. Read more
Source§fn spop<K, M, A>(
&mut self,
key: K,
count: usize,
) -> PreparedCommand<'_, Self, A>
fn spop<K, M, A>( &mut self, key: K, count: usize, ) -> PreparedCommand<'_, Self, A>
Removes and returns one or more random members from the set value store at key. Read more
Source§fn srandmember<K, M, A>(
&mut self,
key: K,
count: usize,
) -> PreparedCommand<'_, Self, A>
fn srandmember<K, M, A>( &mut self, key: K, count: usize, ) -> PreparedCommand<'_, Self, A>
Removes and returns one or more random members from the set value store at key. Read more
Source§fn srem<K, M, C>(
&mut self,
key: K,
members: C,
) -> PreparedCommand<'_, Self, usize>
fn srem<K, M, C>( &mut self, key: K, members: C, ) -> PreparedCommand<'_, Self, usize>
Remove the specified members from the set stored at key. Read more
Source§fn sscan<K, M>(
&mut self,
key: K,
cursor: u64,
options: SScanOptions,
) -> PreparedCommand<'_, Self, (u64, Vec<M>)>
fn sscan<K, M>( &mut self, key: K, cursor: u64, options: SScanOptions, ) -> PreparedCommand<'_, Self, (u64, Vec<M>)>
Iterates elements of Sets types. Read more
Source§fn sunion<K, M, C, A>(&mut self, keys: C) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<CommandArg>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
A: FromSingleValueArray<M>,
fn sunion<K, M, C, A>(&mut self, keys: C) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<CommandArg>,
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
Source§fn sunionstore<D, K, C>(
&mut self,
destination: D,
keys: C,
) -> PreparedCommand<'_, Self, usize>
fn sunionstore<D, K, C>( &mut self, destination: D, keys: C, ) -> PreparedCommand<'_, Self, usize>
Source§impl SortedSetCommands for Transaction
impl SortedSetCommands for Transaction
Source§fn zadd<K, M, I>(
&mut self,
key: K,
items: I,
options: ZAddOptions,
) -> PreparedCommand<'_, Self, usize>
fn zadd<K, M, I>( &mut self, key: K, items: I, options: ZAddOptions, ) -> PreparedCommand<'_, Self, usize>
Adds all the specified members with the specified scores
to the sorted set stored at key. Read more
Source§fn zadd_incr<K, M>(
&mut self,
key: K,
condition: ZAddCondition,
comparison: ZAddComparison,
change: bool,
score: f64,
member: M,
) -> PreparedCommand<'_, Self, Option<f64>>
fn zadd_incr<K, M>( &mut self, key: K, condition: ZAddCondition, comparison: ZAddComparison, change: bool, score: f64, member: M, ) -> PreparedCommand<'_, Self, Option<f64>>
In this mode ZADD acts like ZINCRBY.
Only one score-element pair can be specified in this mode. Read more
Source§fn zcard<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>
fn zcard<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>
Returns the sorted set cardinality (number of elements)
of the sorted set stored at key. Read more
Source§fn zcount<K, M1, M2>(
&mut self,
key: K,
min: M1,
max: M2,
) -> PreparedCommand<'_, Self, usize>
fn zcount<K, M1, M2>( &mut self, key: K, min: M1, max: M2, ) -> PreparedCommand<'_, Self, usize>
Returns the number of elements in the sorted set at key with a score between min and max. Read more
Source§fn zdiff<K, C, E>(&mut self, keys: C) -> PreparedCommand<'_, Self, Vec<E>>
fn zdiff<K, C, E>(&mut self, keys: C) -> PreparedCommand<'_, Self, Vec<E>>
This command is similar to zdiffstore, but instead of storing the resulting sorted set,
it is returned to the client. Read more
Source§fn zdiff_with_scores<K, C, E>(
&mut self,
keys: C,
) -> PreparedCommand<'_, Self, Vec<(E, f64)>>
fn zdiff_with_scores<K, C, E>( &mut self, keys: C, ) -> PreparedCommand<'_, Self, Vec<(E, f64)>>
This command is similar to zdiffstore, but instead of storing the resulting sorted set,
it is returned to the client. Read more
Source§fn zdiffstore<D, K, C>(
&mut self,
destination: D,
keys: C,
) -> PreparedCommand<'_, Self, usize>
fn zdiffstore<D, K, C>( &mut self, destination: D, keys: C, ) -> PreparedCommand<'_, Self, usize>
Computes the difference between the first and all successive
input sorted sets and stores the result in destination. Read more
Source§fn zincrby<K, M>(
&mut self,
key: K,
increment: f64,
member: M,
) -> PreparedCommand<'_, Self, f64>
fn zincrby<K, M>( &mut self, key: K, increment: f64, member: M, ) -> PreparedCommand<'_, Self, f64>
Increments the score of member in the sorted set stored at key by increment. Read more
Source§fn zinter<K, C, W, E>(
&mut self,
keys: C,
weights: Option<W>,
aggregate: ZAggregate,
) -> PreparedCommand<'_, Self, Vec<E>>where
Self: Sized,
K: Into<CommandArg>,
C: SingleArgOrCollection<K>,
W: SingleArgOrCollection<f64>,
E: FromValue,
fn zinter<K, C, W, E>(
&mut self,
keys: C,
weights: Option<W>,
aggregate: ZAggregate,
) -> PreparedCommand<'_, Self, Vec<E>>where
Self: Sized,
K: Into<CommandArg>,
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
Source§fn zinter_with_scores<K, C, W, E>(
&mut self,
keys: C,
weights: Option<W>,
aggregate: ZAggregate,
) -> PreparedCommand<'_, Self, Vec<(E, f64)>>where
Self: Sized,
K: Into<CommandArg>,
C: SingleArgOrCollection<K>,
W: SingleArgOrCollection<f64>,
E: FromValue,
fn zinter_with_scores<K, C, W, E>(
&mut self,
keys: C,
weights: Option<W>,
aggregate: ZAggregate,
) -> PreparedCommand<'_, Self, Vec<(E, f64)>>where
Self: Sized,
K: Into<CommandArg>,
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
Source§fn zintercard<K, C>(
&mut self,
keys: C,
limit: usize,
) -> PreparedCommand<'_, Self, usize>
fn zintercard<K, C>( &mut self, keys: C, limit: usize, ) -> PreparedCommand<'_, Self, usize>
Source§fn zinterstore<D, K, C, W>(
&mut self,
destination: D,
keys: C,
weights: Option<W>,
aggregate: ZAggregate,
) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
D: Into<CommandArg>,
K: Into<CommandArg>,
C: SingleArgOrCollection<K>,
W: SingleArgOrCollection<f64>,
fn zinterstore<D, K, C, W>(
&mut self,
destination: D,
keys: C,
weights: Option<W>,
aggregate: ZAggregate,
) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
D: Into<CommandArg>,
K: Into<CommandArg>,
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
Source§fn zlexcount<K, M1, M2>(
&mut self,
key: K,
min: M1,
max: M2,
) -> PreparedCommand<'_, Self, usize>
fn zlexcount<K, M1, M2>( &mut self, key: K, min: M1, max: M2, ) -> PreparedCommand<'_, Self, usize>
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
Source§fn zmpop<K, C, E>(
&mut self,
keys: C,
where_: ZWhere,
count: usize,
) -> PreparedCommand<'_, Self, Option<ZMPopResult<E>>>
fn zmpop<K, C, E>( &mut self, keys: C, where_: ZWhere, count: usize, ) -> PreparedCommand<'_, Self, Option<ZMPopResult<E>>>
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
Source§fn zmscore<K, M, C>(
&mut self,
key: K,
members: C,
) -> PreparedCommand<'_, Self, Vec<Option<f64>>>
fn zmscore<K, M, C>( &mut self, key: K, members: C, ) -> PreparedCommand<'_, Self, Vec<Option<f64>>>
Returns the scores associated with the specified members in the sorted set stored at key. Read more
Source§fn zpopmax<K, M>(
&mut self,
key: K,
count: usize,
) -> PreparedCommand<'_, Self, Vec<(M, f64)>>
fn zpopmax<K, M>( &mut self, key: K, count: usize, ) -> PreparedCommand<'_, Self, Vec<(M, f64)>>
Removes and returns up to count members with the highest scores in the sorted set stored at key. Read more
Source§fn zpopmin<K, M>(
&mut self,
key: K,
count: usize,
) -> PreparedCommand<'_, Self, Vec<(M, f64)>>
fn zpopmin<K, M>( &mut self, key: K, count: usize, ) -> PreparedCommand<'_, Self, Vec<(M, f64)>>
Removes and returns up to count members with the lowest scores in the sorted set stored at key. Read more
Source§fn zrandmember<K, E>(&mut self, key: K) -> PreparedCommand<'_, Self, E>
fn zrandmember<K, E>(&mut self, key: K) -> PreparedCommand<'_, Self, E>
Return a random element from the sorted set value stored at key. Read more
Source§fn zrandmembers<K, E>(
&mut self,
key: K,
count: isize,
) -> PreparedCommand<'_, Self, Vec<E>>
fn zrandmembers<K, E>( &mut self, key: K, count: isize, ) -> PreparedCommand<'_, Self, Vec<E>>
Return random elements from the sorted set value stored at key. Read more
Source§fn zrandmembers_with_scores<K, E>(
&mut self,
key: K,
count: isize,
) -> PreparedCommand<'_, Self, Vec<E>>
fn zrandmembers_with_scores<K, E>( &mut self, key: K, count: isize, ) -> PreparedCommand<'_, Self, Vec<E>>
Return random elements with their scores from the sorted set value stored at key. Read more
Source§fn zrange<K, S, E>(
&mut self,
key: K,
start: S,
stop: S,
options: ZRangeOptions,
) -> PreparedCommand<'_, Self, Vec<E>>
fn zrange<K, S, E>( &mut self, key: K, start: S, stop: S, options: ZRangeOptions, ) -> PreparedCommand<'_, Self, Vec<E>>
Returns the specified range of elements in the sorted set stored at
key
. Read moreSource§fn zrange_with_scores<K, S, E>(
&mut self,
key: K,
start: S,
stop: S,
options: ZRangeOptions,
) -> PreparedCommand<'_, Self, Vec<(E, f64)>>
fn zrange_with_scores<K, S, E>( &mut self, key: K, start: S, stop: S, options: ZRangeOptions, ) -> PreparedCommand<'_, Self, Vec<(E, f64)>>
Returns the specified range of elements in the sorted set stored at
key
. Read moreSource§fn zrangestore<D, S, SS>(
&mut self,
dst: D,
src: S,
start: SS,
stop: SS,
options: ZRangeOptions,
) -> PreparedCommand<'_, Self, usize>
fn zrangestore<D, S, SS>( &mut self, dst: D, src: S, start: SS, stop: SS, options: ZRangeOptions, ) -> PreparedCommand<'_, Self, usize>
Source§fn zrank<K, M>(
&mut self,
key: K,
member: M,
) -> PreparedCommand<'_, Self, Option<usize>>
fn zrank<K, M>( &mut self, key: K, member: M, ) -> PreparedCommand<'_, Self, Option<usize>>
Returns the rank of member in the sorted set stored at key,
with the scores ordered from low to high. Read more
Source§fn zrem<K, M, C>(
&mut self,
key: K,
members: C,
) -> PreparedCommand<'_, Self, usize>
fn zrem<K, M, C>( &mut self, key: K, members: C, ) -> PreparedCommand<'_, Self, usize>
Removes the specified members from the sorted set stored at key. Read more
Source§fn zremrangebylex<K, S>(
&mut self,
key: K,
start: S,
stop: S,
) -> PreparedCommand<'_, Self, usize>
fn zremrangebylex<K, S>( &mut self, key: K, start: S, stop: S, ) -> PreparedCommand<'_, Self, usize>
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
Source§fn zremrangebyrank<K>(
&mut self,
key: K,
start: isize,
stop: isize,
) -> PreparedCommand<'_, Self, usize>
fn zremrangebyrank<K>( &mut self, key: K, start: isize, stop: isize, ) -> PreparedCommand<'_, Self, usize>
Removes all elements in the sorted set stored at key with rank between start and stop. Read more
Source§fn zremrangebyscore<K, S>(
&mut self,
key: K,
start: S,
stop: S,
) -> PreparedCommand<'_, Self, usize>
fn zremrangebyscore<K, S>( &mut self, key: K, start: S, stop: S, ) -> PreparedCommand<'_, Self, usize>
Removes all elements in the sorted set stored at key with a score between min and max (inclusive). Read more
Source§fn zrevrank<K, M>(
&mut self,
key: K,
member: M,
) -> PreparedCommand<'_, Self, Option<usize>>
fn zrevrank<K, M>( &mut self, key: K, member: M, ) -> PreparedCommand<'_, Self, Option<usize>>
Returns the rank of member in the sorted set stored at key, with the scores ordered from high to low. Read more
Source§fn zscan<K, M>(
&mut self,
key: K,
cursor: usize,
options: ZScanOptions,
) -> PreparedCommand<'_, Self, (u64, Vec<(M, f64)>)>
fn zscan<K, M>( &mut self, key: K, cursor: usize, options: ZScanOptions, ) -> PreparedCommand<'_, Self, (u64, Vec<(M, f64)>)>
Iterates elements of Sorted Set types and their associated scores. Read more
Source§fn zscore<K, M>(
&mut self,
key: K,
member: M,
) -> PreparedCommand<'_, Self, Option<f64>>
fn zscore<K, M>( &mut self, key: K, member: M, ) -> PreparedCommand<'_, Self, Option<f64>>
Returns the score of member in the sorted set at key. Read more
Source§fn zunion<K, C, W, E>(
&mut self,
keys: C,
weights: Option<W>,
aggregate: ZAggregate,
) -> PreparedCommand<'_, Self, Vec<E>>where
Self: Sized,
K: Into<CommandArg>,
C: SingleArgOrCollection<K>,
W: SingleArgOrCollection<f64>,
E: FromValue,
fn zunion<K, C, W, E>(
&mut self,
keys: C,
weights: Option<W>,
aggregate: ZAggregate,
) -> PreparedCommand<'_, Self, Vec<E>>where
Self: Sized,
K: Into<CommandArg>,
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
Source§fn zunion_with_scores<K, C, W, E>(
&mut self,
keys: C,
weights: Option<W>,
aggregate: ZAggregate,
) -> PreparedCommand<'_, Self, Vec<(E, f64)>>where
Self: Sized,
K: Into<CommandArg>,
C: SingleArgOrCollection<K>,
W: SingleArgOrCollection<f64>,
E: FromValue,
fn zunion_with_scores<K, C, W, E>(
&mut self,
keys: C,
weights: Option<W>,
aggregate: ZAggregate,
) -> PreparedCommand<'_, Self, Vec<(E, f64)>>where
Self: Sized,
K: Into<CommandArg>,
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
Source§fn zunionstore<D, K, C, W>(
&mut self,
destination: D,
keys: C,
weights: Option<W>,
aggregate: ZAggregate,
) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
D: Into<CommandArg>,
K: Into<CommandArg>,
C: SingleArgOrCollection<K>,
W: SingleArgOrCollection<f64>,
fn zunionstore<D, K, C, W>(
&mut self,
destination: D,
keys: C,
weights: Option<W>,
aggregate: ZAggregate,
) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
D: Into<CommandArg>,
K: Into<CommandArg>,
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
Source§impl StreamCommands for Transaction
impl StreamCommands for Transaction
Source§fn xack<K, G, I, II>(
&mut self,
key: K,
group: G,
ids: II,
) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg>,
I: Into<CommandArg>,
II: SingleArgOrCollection<I>,
fn xack<K, G, I, II>(
&mut self,
key: K,
group: G,
ids: II,
) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg>,
I: Into<CommandArg>,
II: SingleArgOrCollection<I>,
The XACK command removes one or multiple messages
from the Pending Entries List (PEL) of a stream consumer group Read more
Source§fn xadd<K, I, F, V, FFVV, R>(
&mut self,
key: K,
stream_id: I,
items: FFVV,
options: XAddOptions,
) -> PreparedCommand<'_, Self, R>where
Self: Sized,
K: Into<CommandArg>,
I: Into<CommandArg>,
F: Into<CommandArg>,
V: Into<CommandArg>,
FFVV: KeyValueArgOrCollection<F, V>,
R: FromValue,
fn xadd<K, I, F, V, FFVV, R>(
&mut self,
key: K,
stream_id: I,
items: FFVV,
options: XAddOptions,
) -> PreparedCommand<'_, Self, R>where
Self: Sized,
K: Into<CommandArg>,
I: Into<CommandArg>,
F: Into<CommandArg>,
V: Into<CommandArg>,
FFVV: KeyValueArgOrCollection<F, V>,
R: FromValue,
Appends the specified stream entry to the stream at the specified key. Read more
Source§fn xautoclaim<K, G, C, I, V>(
&mut self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
start: I,
options: XAutoClaimOptions,
) -> PreparedCommand<'_, Self, XAutoClaimResult<V>>where
Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg>,
C: Into<CommandArg>,
I: Into<CommandArg>,
V: FromValue,
fn xautoclaim<K, G, C, I, V>(
&mut self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
start: I,
options: XAutoClaimOptions,
) -> PreparedCommand<'_, Self, XAutoClaimResult<V>>where
Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg>,
C: Into<CommandArg>,
I: Into<CommandArg>,
V: FromValue,
This command transfers ownership of pending stream entries that match the specified criteria. Read more
Source§fn xclaim<K, G, C, I, II, V>(
&mut self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
ids: II,
options: XClaimOptions,
) -> PreparedCommand<'_, Self, Vec<StreamEntry<V>>>where
Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg>,
C: Into<CommandArg>,
I: Into<CommandArg>,
II: SingleArgOrCollection<I>,
V: FromValue,
fn xclaim<K, G, C, I, II, V>(
&mut self,
key: K,
group: G,
consumer: C,
min_idle_time: u64,
ids: II,
options: XClaimOptions,
) -> PreparedCommand<'_, Self, Vec<StreamEntry<V>>>where
Self: Sized,
K: Into<CommandArg>,
G: Into<CommandArg>,
C: Into<CommandArg>,
I: Into<CommandArg>,
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
Source§fn xdel<K, I, II>(
&mut self,
key: K,
ids: II,
) -> PreparedCommand<'_, Self, usize>
fn xdel<K, I, II>( &mut self, key: K, ids: II, ) -> PreparedCommand<'_, Self, usize>
Removes the specified entries from a stream, and returns the number of entries deleted. Read more
Source§fn xgroup_create<K, G, I>(
&mut self,
key: K,
groupname: G,
id: I,
options: XGroupCreateOptions,
) -> PreparedCommand<'_, Self, bool>
fn xgroup_create<K, G, I>( &mut self, key: K, groupname: G, id: I, options: XGroupCreateOptions, ) -> PreparedCommand<'_, Self, bool>
This command creates a new consumer group uniquely identified by for the stream stored at . Read more
Source§fn xgroup_createconsumer<K, G, C>(
&mut self,
key: K,
groupname: G,
consumername: C,
) -> PreparedCommand<'_, Self, bool>
fn xgroup_createconsumer<K, G, C>( &mut self, key: K, groupname: G, consumername: C, ) -> PreparedCommand<'_, Self, bool>
Create a consumer named
consumername
in the consumer group groupname`` of the stream that's stored at
key. Read moreSource§fn xgroup_delconsumer<K, G, C>(
&mut self,
key: K,
groupname: G,
consumername: C,
) -> PreparedCommand<'_, Self, usize>
fn xgroup_delconsumer<K, G, C>( &mut self, key: K, groupname: G, consumername: C, ) -> PreparedCommand<'_, Self, usize>
The XGROUP DELCONSUMER command deletes a consumer from the consumer group. Read more
Source§fn xgroup_destroy<K, G>(
&mut self,
key: K,
groupname: G,
) -> PreparedCommand<'_, Self, bool>
fn xgroup_destroy<K, G>( &mut self, key: K, groupname: G, ) -> PreparedCommand<'_, Self, bool>
The XGROUP DESTROY command completely destroys a consumer group. Read more
Source§fn xgroup_setid<K, G, I>(
&mut self,
key: K,
groupname: G,
id: I,
entries_read: Option<usize>,
) -> PreparedCommand<'_, Self, ()>
fn xgroup_setid<K, G, I>( &mut self, key: K, groupname: G, id: I, entries_read: Option<usize>, ) -> PreparedCommand<'_, Self, ()>
Set the last delivered ID for a consumer group. Read more
Source§fn xinfo_consumers<K, G>(
&mut self,
key: K,
groupname: G,
) -> PreparedCommand<'_, Self, Vec<XConsumerInfo>>
fn xinfo_consumers<K, G>( &mut self, key: K, groupname: G, ) -> PreparedCommand<'_, Self, Vec<XConsumerInfo>>
This command returns the list of consumers that belong to the
groupname
consumer group of the stream stored at key
. Read moreSource§fn xinfo_groups<K>(
&mut self,
key: K,
) -> PreparedCommand<'_, Self, Vec<XGroupInfo>>
fn xinfo_groups<K>( &mut self, key: K, ) -> PreparedCommand<'_, Self, Vec<XGroupInfo>>
This command returns the list of consumers that belong
to the
groupname
consumer group of the stream stored at key
. Read moreSource§fn xinfo_stream<K>(
&mut self,
key: K,
options: XInfoStreamOptions,
) -> PreparedCommand<'_, Self, XStreamInfo>
fn xinfo_stream<K>( &mut self, key: K, options: XInfoStreamOptions, ) -> PreparedCommand<'_, Self, XStreamInfo>
This command returns information about the stream stored at
key
. Read moreSource§fn xlen<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>
fn xlen<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>
Returns the number of entries inside a stream. Read more
Source§fn xpending<K, G>(
&mut self,
key: K,
group: G,
) -> PreparedCommand<'_, Self, XPendingResult>
fn xpending<K, G>( &mut self, key: K, group: G, ) -> PreparedCommand<'_, Self, XPendingResult>
The XPENDING command is the interface to inspect the list of pending messages. Read more
Source§fn xpending_with_options<K, G>(
&mut self,
key: K,
group: G,
options: XPendingOptions,
) -> PreparedCommand<'_, Self, Vec<XPendingMessageResult>>
fn xpending_with_options<K, G>( &mut self, key: K, group: G, options: XPendingOptions, ) -> PreparedCommand<'_, Self, Vec<XPendingMessageResult>>
The XPENDING command is the interface to inspect the list of pending messages. Read more
Source§fn xrange<K, S, E, V>(
&mut self,
key: K,
start: S,
end: E,
count: Option<usize>,
) -> PreparedCommand<'_, Self, Vec<StreamEntry<V>>>
fn xrange<K, S, E, V>( &mut self, key: K, start: S, end: E, count: Option<usize>, ) -> PreparedCommand<'_, Self, Vec<StreamEntry<V>>>
The command returns the stream entries matching a given range of IDs. Read more
Source§fn xread<K, KK, I, II, V, R>(
&mut self,
options: XReadOptions,
keys: KK,
ids: II,
) -> PreparedCommand<'_, Self, R>where
Self: Sized,
K: Into<CommandArg>,
KK: SingleArgOrCollection<K>,
I: Into<CommandArg>,
II: SingleArgOrCollection<I>,
V: FromValue,
R: FromKeyValueValueArray<String, Vec<StreamEntry<V>>>,
fn xread<K, KK, I, II, V, R>(
&mut self,
options: XReadOptions,
keys: KK,
ids: II,
) -> PreparedCommand<'_, Self, R>where
Self: Sized,
K: Into<CommandArg>,
KK: SingleArgOrCollection<K>,
I: Into<CommandArg>,
II: SingleArgOrCollection<I>,
V: FromValue,
R: FromKeyValueValueArray<String, Vec<StreamEntry<V>>>,
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
Source§fn xreadgroup<G, C, K, KK, I, II, V, R>(
&mut self,
group: G,
consumer: C,
options: XReadGroupOptions,
keys: KK,
ids: II,
) -> PreparedCommand<'_, Self, R>where
Self: Sized,
G: Into<CommandArg>,
C: Into<CommandArg>,
K: Into<CommandArg>,
KK: SingleArgOrCollection<K>,
I: Into<CommandArg>,
II: SingleArgOrCollection<I>,
V: FromValue,
R: FromKeyValueValueArray<String, Vec<StreamEntry<V>>>,
fn xreadgroup<G, C, K, KK, I, II, V, R>(
&mut self,
group: G,
consumer: C,
options: XReadGroupOptions,
keys: KK,
ids: II,
) -> PreparedCommand<'_, Self, R>where
Self: Sized,
G: Into<CommandArg>,
C: Into<CommandArg>,
K: Into<CommandArg>,
KK: SingleArgOrCollection<K>,
I: Into<CommandArg>,
II: SingleArgOrCollection<I>,
V: FromValue,
R: FromKeyValueValueArray<String, Vec<StreamEntry<V>>>,
Source§fn xrevrange<K, E, S, V>(
&mut self,
key: K,
end: E,
start: S,
count: Option<usize>,
) -> PreparedCommand<'_, Self, Vec<StreamEntry<V>>>
fn xrevrange<K, E, S, V>( &mut self, key: K, end: E, start: S, count: Option<usize>, ) -> PreparedCommand<'_, Self, Vec<StreamEntry<V>>>
Source§fn xtrim<K>(
&mut self,
key: K,
options: XTrimOptions,
) -> PreparedCommand<'_, Self, usize>
fn xtrim<K>( &mut self, key: K, options: XTrimOptions, ) -> PreparedCommand<'_, Self, usize>
XTRIM trims the stream by evicting older entries (entries with lower IDs) if needed. Read more
Source§impl StringCommands for Transaction
impl StringCommands for Transaction
Source§fn append<K, V>(&mut self, key: K, value: V) -> PreparedCommand<'_, Self, usize>
fn append<K, V>(&mut self, key: K, value: V) -> PreparedCommand<'_, Self, usize>
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
Source§fn decr<K>(&mut self, key: K) -> PreparedCommand<'_, Self, i64>
fn decr<K>(&mut self, key: K) -> PreparedCommand<'_, Self, i64>
Decrements the number stored at key by one. Read more
Source§fn decrby<K>(
&mut self,
key: K,
decrement: i64,
) -> PreparedCommand<'_, Self, i64>
fn decrby<K>( &mut self, key: K, decrement: i64, ) -> PreparedCommand<'_, Self, i64>
Decrements the number stored at key by one. Read more
Source§fn get<K, V>(&mut self, key: K) -> PreparedCommand<'_, Self, V>
fn get<K, V>(&mut self, key: K) -> PreparedCommand<'_, Self, V>
Get the value of key. Read more
Source§fn getdel<K, V>(&mut self, key: K) -> PreparedCommand<'_, Self, V>
fn getdel<K, V>(&mut self, key: K) -> PreparedCommand<'_, Self, V>
Get the value of key and delete the key. Read more
Source§fn getex<K, V>(
&mut self,
key: K,
options: GetExOptions,
) -> PreparedCommand<'_, Self, V>
fn getex<K, V>( &mut self, key: K, options: GetExOptions, ) -> PreparedCommand<'_, Self, V>
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
Source§fn getrange<K, V>(
&mut self,
key: K,
start: usize,
end: isize,
) -> PreparedCommand<'_, Self, V>
fn getrange<K, V>( &mut self, key: K, start: usize, end: isize, ) -> PreparedCommand<'_, Self, V>
Returns the substring of the string value stored at key, determined by the offsets start and end (both are inclusive). Read more
Source§fn getset<K, V, R>(&mut self, key: K, value: V) -> PreparedCommand<'_, Self, R>
fn getset<K, V, R>(&mut self, key: K, value: V) -> PreparedCommand<'_, Self, R>
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
Source§fn incr<K>(&mut self, key: K) -> PreparedCommand<'_, Self, i64>
fn incr<K>(&mut self, key: K) -> PreparedCommand<'_, Self, i64>
Increments the number stored at key by one. Read more
Source§fn incrby<K>(
&mut self,
key: K,
increment: i64,
) -> PreparedCommand<'_, Self, i64>
fn incrby<K>( &mut self, key: K, increment: i64, ) -> PreparedCommand<'_, Self, i64>
Increments the number stored at key by increment. Read more
Source§fn incrbyfloat<K>(
&mut self,
key: K,
increment: f64,
) -> PreparedCommand<'_, Self, f64>
fn incrbyfloat<K>( &mut self, key: K, increment: f64, ) -> PreparedCommand<'_, Self, f64>
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
Source§fn lcs<K, V>(&mut self, key1: K, key2: K) -> PreparedCommand<'_, Self, V>
fn lcs<K, V>(&mut self, key1: K, key2: K) -> PreparedCommand<'_, Self, V>
The LCS command implements the longest common subsequence algorithm Read more
Source§fn lcs_len<K>(&mut self, key1: K, key2: K) -> PreparedCommand<'_, Self, usize>
fn lcs_len<K>(&mut self, key1: K, key2: K) -> PreparedCommand<'_, Self, usize>
The LCS command implements the longest common subsequence algorithm Read more
Source§fn lcs_idx<K>(
&mut self,
key1: K,
key2: K,
min_match_len: Option<usize>,
with_match_len: bool,
) -> PreparedCommand<'_, Self, LcsResult>
fn lcs_idx<K>( &mut self, key1: K, key2: K, min_match_len: Option<usize>, with_match_len: bool, ) -> PreparedCommand<'_, Self, LcsResult>
The LCS command implements the longest common subsequence algorithm Read more
Source§fn mget<K, KK, V, VV>(&mut self, keys: KK) -> PreparedCommand<'_, Self, VV>where
Self: Sized,
K: Into<CommandArg>,
KK: SingleArgOrCollection<K>,
V: FromValue,
VV: FromSingleValueArray<V>,
fn mget<K, KK, V, VV>(&mut self, keys: KK) -> PreparedCommand<'_, Self, VV>where
Self: Sized,
K: Into<CommandArg>,
KK: SingleArgOrCollection<K>,
V: FromValue,
VV: FromSingleValueArray<V>,
Returns the values of all specified keys. Read more
Source§fn mset<K, V, C>(&mut self, items: C) -> PreparedCommand<'_, Self, ()>
fn mset<K, V, C>(&mut self, items: C) -> PreparedCommand<'_, Self, ()>
Sets the given keys to their respective values. Read more
Source§fn msetnx<K, V, C>(&mut self, items: C) -> PreparedCommand<'_, Self, bool>
fn msetnx<K, V, C>(&mut self, items: C) -> PreparedCommand<'_, Self, bool>
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
Source§fn psetex<K, V>(
&mut self,
key: K,
milliseconds: u64,
value: V,
) -> PreparedCommand<'_, Self, ()>
fn psetex<K, V>( &mut self, key: K, milliseconds: u64, value: V, ) -> PreparedCommand<'_, Self, ()>
Source§fn set<K, V>(&mut self, key: K, value: V) -> PreparedCommand<'_, Self, ()>
fn set<K, V>(&mut self, key: K, value: V) -> PreparedCommand<'_, Self, ()>
Set key to hold the string value. Read more
Source§fn set_with_options<K, V>(
&mut self,
key: K,
value: V,
condition: SetCondition,
expiration: SetExpiration,
keep_ttl: bool,
) -> PreparedCommand<'_, Self, bool>
fn set_with_options<K, V>( &mut self, key: K, value: V, condition: SetCondition, expiration: SetExpiration, keep_ttl: bool, ) -> PreparedCommand<'_, Self, bool>
Set key to hold the string value. Read more
Source§fn set_get_with_options<K, V1, V2>(
&mut self,
key: K,
value: V1,
condition: SetCondition,
expiration: SetExpiration,
keep_ttl: bool,
) -> PreparedCommand<'_, Self, V2>
fn set_get_with_options<K, V1, V2>( &mut self, key: K, value: V1, condition: SetCondition, expiration: SetExpiration, keep_ttl: bool, ) -> PreparedCommand<'_, Self, V2>
Set key to hold the string value wit GET option enforced Read more
Source§fn setex<K, V>(
&mut self,
key: K,
seconds: u64,
value: V,
) -> PreparedCommand<'_, Self, ()>
fn setex<K, V>( &mut self, key: K, seconds: u64, value: V, ) -> PreparedCommand<'_, Self, ()>
Set key to hold the string value and set key to timeout after a given number of seconds. Read more
Source§fn setnx<K, V>(&mut self, key: K, value: V) -> PreparedCommand<'_, Self, bool>
fn setnx<K, V>(&mut self, key: K, value: V) -> PreparedCommand<'_, Self, bool>
Set key to hold string value if key does not exist. Read more
Source§fn setrange<K, V>(
&mut self,
key: K,
offset: usize,
value: V,
) -> PreparedCommand<'_, Self, usize>
fn setrange<K, V>( &mut self, key: K, offset: usize, value: V, ) -> PreparedCommand<'_, Self, usize>
Overwrites part of the string stored at key,
starting at the specified offset,
for the entire length of value. Read more
Auto Trait Implementations§
impl Freeze for Transaction
impl !RefUnwindSafe for Transaction
impl Send for Transaction
impl !Sync for Transaction
impl Unpin for Transaction
impl !UnwindSafe for Transaction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more