Trait redis_driver::HashCommands
source · [−]pub trait HashCommands: CommandSend {
Show 15 methods
fn hdel<K, F>(
&self,
key: K,
fields: F
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
where
K: Into<BulkString> + Send,
F: IntoArgs + 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,
{ ... }
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,
{ ... }
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,
{ ... }
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,
{ ... }
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,
{ ... }
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,
{ ... }
fn hlen<K>(
&self,
key: K
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
where
K: Into<BulkString> + Send,
{ ... }
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,
{ ... }
fn hrandfield<K>(&self, key: K) -> HRandField<'_, Self>
where
K: Into<BulkString> + Send,
{ ... }
fn hscan<K>(&self, key: K, cursor: usize) -> HScan<'_, Self>
where
K: Into<BulkString> + Send,
{ ... }
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,
{ ... }
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,
{ ... }
fn hstrlen<K, F>(
&self,
key: K,
field: F
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
where
K: Into<BulkString> + Send + Sync + Copy,
F: Into<BulkString> + Send + Sync + Copy,
{ ... }
fn hvals<'a, K, V>(
&'a self,
key: K
) -> Pin<Box<dyn Future<Output = Result<Vec<V>>> + 'a>>
where
K: Into<BulkString> + Send + Sync + Copy,
V: FromValue + Send + 'a,
{ ... }
}
Expand description
Provided Methods
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,
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.