Struct redis_driver::Transaction
source · [−]pub struct Transaction { /* private fields */ }
Implementations
Trait Implementations
sourceimpl CommandSend for Transaction
impl CommandSend for Transaction
sourceimpl GenericCommands for Transaction
impl GenericCommands for Transaction
sourcefn copy<S, D>(&self, source: S, destination: D) -> Copy<'_, Self>where
S: Into<BulkString> + Send,
D: Into<BulkString> + Send,
fn copy<S, D>(&self, source: S, destination: D) -> Copy<'_, Self>where
S: Into<BulkString> + Send,
D: Into<BulkString> + Send,
This command copies the value stored at the source key to the destination key. Read more
sourcefn del<K>(&self, keys: K) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: IntoArgs + Send,
fn del<K>(&self, keys: K) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: IntoArgs + Send,
Removes the specified keys. A key is ignored if it does not exist. Read more
sourcefn exists<K>(&self, keys: K) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: IntoArgs + Send,
fn exists<K>(&self, keys: K) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: IntoArgs + Send,
Returns if keys exist. Read more
sourcefn expire<K>(&self, key: K, seconds: u64) -> Expire<'_, Self>where
K: Into<BulkString> + Send,
fn expire<K>(&self, key: K, seconds: u64) -> Expire<'_, Self>where
K: Into<BulkString> + Send,
Set a timeout on key in seconds Read more
sourcefn expireat<K>(&self, key: K, unix_time_seconds: u64) -> Expire<'_, Self>where
K: Into<BulkString> + Send,
fn expireat<K>(&self, key: K, unix_time_seconds: u64) -> Expire<'_, Self>where
K: Into<BulkString> + Send,
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
) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>where
K: Into<BulkString> + Send,
fn expiretime<K>(
&self,
key: K
) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>where
K: Into<BulkString> + Send,
Returns the absolute Unix timestamp (since January 1, 1970) in seconds at which the given key will expire. Read more
sourcefn move_<K>(
&self,
key: K,
db: usize
) -> Pin<Box<dyn Future<Output = Result<bool>> + '_>>where
K: Into<BulkString> + Send,
fn move_<K>(
&self,
key: K,
db: usize
) -> Pin<Box<dyn Future<Output = Result<bool>> + '_>>where
K: Into<BulkString> + Send,
Move key from the currently selected database to the specified destination database. Read more
sourcefn persist<K>(&self, key: K) -> Pin<Box<dyn Future<Output = Result<bool>> + '_>>where
K: Into<BulkString> + Send,
fn persist<K>(&self, key: K) -> Pin<Box<dyn Future<Output = Result<bool>> + '_>>where
K: Into<BulkString> + Send,
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) -> Expire<'_, Self>where
K: Into<BulkString> + Send,
fn pexpire<K>(&self, key: K, milliseconds: u64) -> Expire<'_, Self>where
K: Into<BulkString> + Send,
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) -> Expire<'_, Self>where
K: Into<BulkString> + Send,
fn pexpireat<K>(&self, key: K, unix_time_milliseconds: u64) -> Expire<'_, Self>where
K: Into<BulkString> + Send,
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
) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>where
K: Into<BulkString> + Send,
fn pexpiretime<K>(
&self,
key: K
) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>where
K: Into<BulkString> + Send,
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) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>where
K: Into<BulkString> + Send,
fn pttl<K>(&self, key: K) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>where
K: Into<BulkString> + Send,
Returns the remaining time to live of a key that has a timeout. Read more
sourceimpl HashCommands for Transaction
impl HashCommands for Transaction
sourcefn hdel<K, F>(
&self,
key: K,
fields: F
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString> + Send,
F: IntoArgs + Send,
fn hdel<K, F>(
&self,
key: K,
fields: F
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString> + Send,
F: IntoArgs + Send,
Removes the specified fields from the hash stored at key. Read more
sourcefn hexists<K, F>(
&self,
key: K,
field: F
) -> Pin<Box<dyn Future<Output = Result<bool>> + '_>>where
K: Into<BulkString> + Send,
F: Into<BulkString> + Send,
fn hexists<K, F>(
&self,
key: K,
field: F
) -> Pin<Box<dyn Future<Output = Result<bool>> + '_>>where
K: Into<BulkString> + Send,
F: Into<BulkString> + Send,
Returns if field is an existing field in the hash stored at key. Read more
sourcefn hget<'a, K, F, V>(
&'a self,
key: K,
field: F
) -> Pin<Box<dyn Future<Output = Result<V>> + 'a>>where
K: Into<BulkString> + Send,
F: Into<BulkString> + Send,
V: FromValue + Send + 'a,
fn hget<'a, K, F, V>(
&'a self,
key: K,
field: F
) -> Pin<Box<dyn Future<Output = Result<V>> + 'a>>where
K: Into<BulkString> + Send,
F: Into<BulkString> + Send,
V: FromValue + Send + 'a,
Returns the value associated with field in the hash stored at key. Read more
sourcefn hgetall<'a, K, F, V>(
&'a self,
key: K
) -> Pin<Box<dyn Future<Output = Result<Vec<(F, V)>>> + 'a>>where
K: Into<BulkString> + Send,
F: FromValue + Send + 'a,
V: FromValue + Send + 'a,
fn hgetall<'a, K, F, V>(
&'a self,
key: K
) -> Pin<Box<dyn Future<Output = Result<Vec<(F, V)>>> + 'a>>where
K: Into<BulkString> + Send,
F: FromValue + Send + 'a,
V: FromValue + Send + 'a,
Returns all fields and values of the hash stored at key. Read more
sourcefn hincrby<K, F>(
&self,
key: K,
field: F,
increment: i64
) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>where
K: Into<BulkString> + Send,
F: Into<BulkString> + Send,
fn hincrby<K, F>(
&self,
key: K,
field: F,
increment: i64
) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>where
K: Into<BulkString> + Send,
F: Into<BulkString> + Send,
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
) -> Pin<Box<dyn Future<Output = Result<f64>> + '_>>where
K: Into<BulkString> + Send,
F: Into<BulkString> + Send,
fn hincrbyfloat<K, F>(
&self,
key: K,
field: F,
increment: f64
) -> Pin<Box<dyn Future<Output = Result<f64>> + '_>>where
K: Into<BulkString> + Send,
F: Into<BulkString> + Send,
Increment the specified field of a hash stored at key, and representing a floating point number, by the specified increment. Read more
sourcefn hkeys<'a, K, F>(
&'a self,
key: K
) -> Pin<Box<dyn Future<Output = Result<Vec<F>>> + 'a>>where
K: Into<BulkString> + Send,
F: FromValue + Send + 'a,
fn hkeys<'a, K, F>(
&'a self,
key: K
) -> Pin<Box<dyn Future<Output = Result<Vec<F>>> + 'a>>where
K: Into<BulkString> + Send,
F: FromValue + Send + 'a,
Returns all field names in the hash stored at key. Read more
sourcefn hlen<K>(&self, key: K) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString> + Send,
fn hlen<K>(&self, key: K) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString> + Send,
Returns the number of fields contained in the hash stored at key. Read more
sourcefn hmget<'a, K, F, V>(
&'a self,
key: K,
fields: F
) -> Pin<Box<dyn Future<Output = Result<Vec<V>>> + 'a>>where
K: Into<BulkString> + Send,
F: IntoArgs + Send,
V: FromValue + Send + 'a,
fn hmget<'a, K, F, V>(
&'a self,
key: K,
fields: F
) -> Pin<Box<dyn Future<Output = Result<Vec<V>>> + 'a>>where
K: Into<BulkString> + Send,
F: IntoArgs + Send,
V: FromValue + Send + 'a,
Returns the values associated with the specified fields in the hash stored at key. Read more
sourcefn hrandfield<K>(&self, key: K) -> HRandField<'_, Self>where
K: Into<BulkString> + Send,
fn hrandfield<K>(&self, key: K) -> HRandField<'_, Self>where
K: Into<BulkString> + Send,
When called with just the key argument, return a random field from the hash value stored at key. Read more
sourcefn hscan<K>(&self, key: K, cursor: usize) -> HScan<'_, Self>where
K: Into<BulkString> + Send,
fn hscan<K>(&self, key: K, cursor: usize) -> HScan<'_, Self>where
K: Into<BulkString> + Send,
Iterates fields of Hash types and their associated values. Read more
sourcefn hset<K, F, V>(
&self,
key: K,
items: &[(F, V)]
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString> + Send + Sync,
F: Into<BulkString> + Send + Sync + Clone,
V: Into<BulkString> + Send + Sync + Clone,
fn hset<K, F, V>(
&self,
key: K,
items: &[(F, V)]
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString> + Send + Sync,
F: Into<BulkString> + Send + Sync + Clone,
V: Into<BulkString> + Send + Sync + Clone,
Sets field in the hash stored at key to value. Read more
sourcefn hsetnx<K, F, V>(
&self,
key: K,
field: F,
value: V
) -> Pin<Box<dyn Future<Output = Result<bool>> + '_>>where
K: Into<BulkString> + Send + Sync + Copy,
F: Into<BulkString> + Send + Sync + Copy,
V: Into<BulkString> + Send + Sync + Copy,
fn hsetnx<K, F, V>(
&self,
key: K,
field: F,
value: V
) -> Pin<Box<dyn Future<Output = Result<bool>> + '_>>where
K: Into<BulkString> + Send + Sync + Copy,
F: Into<BulkString> + Send + Sync + Copy,
V: Into<BulkString> + Send + Sync + Copy,
Sets field in the hash stored at key to value, only if field does not yet exist. Read more
sourceimpl ListCommands for Transaction
impl ListCommands for Transaction
sourcefn lpush<K, E>(
&self,
key: K,
elements: E
) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>where
K: Into<BulkString> + Send,
E: IntoArgs + Send,
fn lpush<K, E>(
&self,
key: K,
elements: E
) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>where
K: Into<BulkString> + Send,
E: IntoArgs + Send,
Insert all the specified values at the head of the list stored at key Read more
sourcefn lpop<K, E>(
&self,
key: K,
count: usize
) -> Pin<Box<dyn Future<Output = Result<Vec<E>>> + '_>>where
K: Into<BulkString> + Send,
E: FromValue,
fn lpop<K, E>(
&self,
key: K,
count: usize
) -> Pin<Box<dyn Future<Output = Result<Vec<E>>> + '_>>where
K: Into<BulkString> + Send,
E: FromValue,
Removes and returns the first elements of the list stored at key. Read more
sourceimpl ServerCommands for Transaction
impl ServerCommands for Transaction
sourceimpl SetCommands for Transaction
impl SetCommands for Transaction
sourcefn sadd<K, M>(
&self,
key: K,
members: M
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
M: IntoArgs,
fn sadd<K, M>(
&self,
key: K,
members: M
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
M: IntoArgs,
Add the specified members to the set stored at key. Read more
sourcefn scard<K>(&self, key: K) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
fn scard<K>(&self, key: K) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
Returns the set cardinality (number of elements) of the set stored at key. Read more
sourcefn sdiff<K, M>(
&self,
keys: K
) -> Pin<Box<dyn Future<Output = Result<HashSet<M>>> + '_>>where
K: IntoArgs,
M: FromValue + Eq + Hash,
fn sdiff<K, M>(
&self,
keys: K
) -> Pin<Box<dyn Future<Output = Result<HashSet<M>>> + '_>>where
K: IntoArgs,
M: FromValue + Eq + Hash,
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>(
&self,
destination: D,
keys: K
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
D: Into<BulkString>,
K: IntoArgs,
fn sdiffstore<D, K>(
&self,
destination: D,
keys: K
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
D: Into<BulkString>,
K: IntoArgs,
sourcefn sinter<K, M>(
&self,
keys: K
) -> Pin<Box<dyn Future<Output = Result<HashSet<M>>> + '_>>where
K: IntoArgs,
M: FromValue + Eq + Hash,
fn sinter<K, M>(
&self,
keys: K
) -> Pin<Box<dyn Future<Output = Result<HashSet<M>>> + '_>>where
K: IntoArgs,
M: FromValue + Eq + Hash,
Returns the members of the set resulting from the intersection of all the given sets. Read more
sourcefn sintercard<K>(
&self,
keys: K,
limit: usize
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: IntoArgs,
fn sintercard<K>(
&self,
keys: K,
limit: usize
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: IntoArgs,
sourcefn sinterstore<D, K>(
&self,
destination: D,
keys: K
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
D: Into<BulkString>,
K: IntoArgs,
fn sinterstore<D, K>(
&self,
destination: D,
keys: K
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
D: Into<BulkString>,
K: IntoArgs,
sourcefn sismember<K, M>(
&self,
key: K,
member: M
) -> Pin<Box<dyn Future<Output = Result<bool>> + '_>>where
K: Into<BulkString>,
M: Into<BulkString>,
fn sismember<K, M>(
&self,
key: K,
member: M
) -> Pin<Box<dyn Future<Output = Result<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>(
&self,
key: K
) -> Pin<Box<dyn Future<Output = Result<HashSet<M>>> + '_>>where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
fn smembers<K, M>(
&self,
key: K
) -> Pin<Box<dyn Future<Output = Result<HashSet<M>>> + '_>>where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
Returns all the members of the set value stored at key. Read more
sourcefn smismember<K, M>(
&self,
key: K,
members: M
) -> Pin<Box<dyn Future<Output = Result<Vec<bool>>> + '_>>where
K: Into<BulkString>,
M: IntoArgs,
fn smismember<K, M>(
&self,
key: K,
members: M
) -> Pin<Box<dyn Future<Output = Result<Vec<bool>>> + '_>>where
K: Into<BulkString>,
M: IntoArgs,
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
) -> Pin<Box<dyn Future<Output = Result<bool>> + '_>>where
S: Into<BulkString>,
D: Into<BulkString>,
M: Into<BulkString>,
fn smove<S, D, M>(
&self,
source: S,
destination: D,
member: M
) -> Pin<Box<dyn Future<Output = Result<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>(
&self,
key: K,
count: usize
) -> Pin<Box<dyn Future<Output = Result<HashSet<M>>> + '_>>where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
fn spop<K, M>(
&self,
key: K,
count: usize
) -> Pin<Box<dyn Future<Output = Result<HashSet<M>>> + '_>>where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
Removes and returns one or more random members from the set value store at key. Read more
sourcefn srandmember<K, M>(
&self,
key: K,
count: usize
) -> Pin<Box<dyn Future<Output = Result<HashSet<M>>> + '_>>where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
fn srandmember<K, M>(
&self,
key: K,
count: usize
) -> Pin<Box<dyn Future<Output = Result<HashSet<M>>> + '_>>where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
Removes and returns one or more random members from the set value store at key. Read more
sourcefn srem<K, M>(
&self,
key: K,
members: M
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
M: IntoArgs,
fn srem<K, M>(
&self,
key: K,
members: M
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
M: IntoArgs,
Remove the specified members from the set stored at key. Read more
sourcefn sscan<K>(&self, key: K, cursor: usize) -> SScan<'_, Self>where
K: Into<BulkString> + Send,
fn sscan<K>(&self, key: K, cursor: usize) -> SScan<'_, Self>where
K: Into<BulkString> + Send,
Iterates elements of Sets types. Read more
sourceimpl StringCommands for Transaction
impl StringCommands for Transaction
sourcefn append<K, V>(
&self,
key: K,
value: V
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString> + Send,
V: Into<BulkString> + Send,
fn append<K, V>(
&self,
key: K,
value: V
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString> + Send,
V: Into<BulkString> + Send,
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) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>where
K: Into<BulkString> + Send,
fn decr<K>(&self, key: K) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>where
K: Into<BulkString> + Send,
Decrements the number stored at key by one. Read more
sourcefn decrby<K>(
&self,
key: K,
decrement: i64
) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>where
K: Into<BulkString> + Send,
fn decrby<K>(
&self,
key: K,
decrement: i64
) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>where
K: Into<BulkString> + Send,
Decrements the number stored at key by one. Read more
sourcefn get<'a, K, V>(
&'a self,
key: K
) -> Pin<Box<dyn Future<Output = Result<V>> + 'a>>where
K: Into<BulkString> + Send,
V: FromValue + Send + 'a,
Self: Sized,
fn get<'a, K, V>(
&'a self,
key: K
) -> Pin<Box<dyn Future<Output = Result<V>> + 'a>>where
K: Into<BulkString> + Send,
V: FromValue + Send + 'a,
Self: Sized,
Get the value of key. Read more
sourcefn getdel<K, V>(&self, key: K) -> Pin<Box<dyn Future<Output = Result<V>> + '_>>where
K: Into<BulkString> + Send,
V: FromValue,
fn getdel<K, V>(&self, key: K) -> Pin<Box<dyn Future<Output = Result<V>> + '_>>where
K: Into<BulkString> + Send,
V: FromValue,
Get the value of key and delete the key. Read more
sourcefn getex<K>(&self, key: K) -> GetEx<'_, Self>where
K: Into<BulkString> + Send,
fn getex<K>(&self, key: K) -> GetEx<'_, Self>where
K: Into<BulkString> + Send,
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
) -> Pin<Box<dyn Future<Output = Result<V>> + '_>>where
K: Into<BulkString> + Send,
V: FromValue,
fn getrange<K, V>(
&self,
key: K,
start: usize,
end: isize
) -> Pin<Box<dyn Future<Output = Result<V>> + '_>>where
K: Into<BulkString> + Send,
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
) -> Pin<Box<dyn Future<Output = Result<R>> + '_>>where
K: Into<BulkString> + Send,
V: Into<BulkString> + Send,
R: FromValue,
fn getset<K, V, R>(
&self,
key: K,
value: V
) -> Pin<Box<dyn Future<Output = Result<R>> + '_>>where
K: Into<BulkString> + Send,
V: Into<BulkString> + Send,
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) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>where
K: Into<BulkString> + Send,
fn incr<K>(&self, key: K) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>where
K: Into<BulkString> + Send,
Increments the number stored at key by one. Read more
sourcefn incrby<K>(
&self,
key: K,
increment: i64
) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>where
K: Into<BulkString> + Send,
fn incrby<K>(
&self,
key: K,
increment: i64
) -> Pin<Box<dyn Future<Output = Result<i64>> + '_>>where
K: Into<BulkString> + Send,
Increments the number stored at key by increment. Read more
sourcefn incrbyfloat<K>(
&self,
key: K,
increment: f64
) -> Pin<Box<dyn Future<Output = Result<f64>> + '_>>where
K: Into<BulkString> + Send,
fn incrbyfloat<K>(
&self,
key: K,
increment: f64
) -> Pin<Box<dyn Future<Output = Result<f64>> + '_>>where
K: Into<BulkString> + Send,
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>(&self, key1: K, key2: K) -> Lcs<'_, Self>where
K: Into<BulkString> + Send,
fn lcs<K>(&self, key1: K, key2: K) -> Lcs<'_, Self>where
K: Into<BulkString> + Send,
The LCS command implements the longest common subsequence algorithm Read more
sourcefn mget<'a, K, V>(
&'a self,
keys: K
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<V>>>> + '_>>where
K: IntoArgs + Send + Sync,
V: FromValue,
fn mget<'a, K, V>(
&'a self,
keys: K
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<V>>>> + '_>>where
K: IntoArgs + Send + Sync,
V: FromValue,
Returns the values of all specified keys. Read more
sourcefn mset<'a, K, V>(
&'a self,
items: &'a [(K, V)]
) -> Pin<Box<dyn Future<Output = Result<()>> + '_>>where
K: Into<BulkString> + Send + Sync + Copy,
V: Into<BulkString> + Send + Sync + Copy,
fn mset<'a, K, V>(
&'a self,
items: &'a [(K, V)]
) -> Pin<Box<dyn Future<Output = Result<()>> + '_>>where
K: Into<BulkString> + Send + Sync + Copy,
V: Into<BulkString> + Send + Sync + Copy,
Sets the given keys to their respective values. Read more
sourcefn msetnx<'a, K, V>(
&'a self,
items: &'a [(K, V)]
) -> Pin<Box<dyn Future<Output = Result<bool>> + '_>>where
K: Into<BulkString> + Send + Sync + Copy,
V: Into<BulkString> + Send + Sync + Copy,
fn msetnx<'a, K, V>(
&'a self,
items: &'a [(K, V)]
) -> Pin<Box<dyn Future<Output = Result<bool>> + '_>>where
K: Into<BulkString> + Send + Sync + Copy,
V: Into<BulkString> + Send + Sync + Copy,
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
) -> Pin<Box<dyn Future<Output = Result<()>> + '_>>where
K: Into<BulkString> + Send,
V: Into<BulkString> + Send,
fn psetex<K, V>(
&self,
key: K,
milliseconds: u64,
value: V
) -> Pin<Box<dyn Future<Output = Result<()>> + '_>>where
K: Into<BulkString> + Send,
V: Into<BulkString> + Send,
sourcefn set<K, V>(
&self,
key: K,
value: V
) -> Pin<Box<dyn Future<Output = Result<()>> + '_>>where
K: Into<BulkString> + Send,
V: Into<BulkString> + Send,
Self: Sized,
fn set<K, V>(
&self,
key: K,
value: V
) -> Pin<Box<dyn Future<Output = Result<()>> + '_>>where
K: Into<BulkString> + Send,
V: Into<BulkString> + Send,
Self: Sized,
Set key to hold the string value. Read more
sourcefn set_with_options<K, V>(&self, key: K, value: V) -> SetWithOptions<'_, Self>where
K: Into<BulkString> + Send,
V: Into<BulkString> + Send,
fn set_with_options<K, V>(&self, key: K, value: V) -> SetWithOptions<'_, Self>where
K: Into<BulkString> + Send,
V: Into<BulkString> + Send,
Set key to hold the string value. Read more
sourcefn setex<K, V>(
&self,
key: K,
seconds: u64,
value: V
) -> Pin<Box<dyn Future<Output = Result<()>> + '_>>where
K: Into<BulkString> + Send,
V: Into<BulkString> + Send,
fn setex<K, V>(
&self,
key: K,
seconds: u64,
value: V
) -> Pin<Box<dyn Future<Output = Result<()>> + '_>>where
K: Into<BulkString> + Send,
V: Into<BulkString> + Send,
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
) -> Pin<Box<dyn Future<Output = Result<bool>> + '_>>where
K: Into<BulkString> + Send,
V: Into<BulkString> + Send,
fn setnx<K, V>(
&self,
key: K,
value: V
) -> Pin<Box<dyn Future<Output = Result<bool>> + '_>>where
K: Into<BulkString> + Send,
V: Into<BulkString> + Send,
Set key to hold string value if key does not exist. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl !UnwindSafe for Transaction
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more