Trait fred::interfaces::HashesInterface
source · pub trait HashesInterface: ClientLike + Sized {
Show 15 methods
// Provided methods
fn hgetall<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<RedisKey> { ... }
fn hdel<R, K, F>(
&self,
key: K,
fields: F,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<RedisKey>,
F: Into<MultipleKeys> { ... }
fn hexists<R, K, F>(
&self,
key: K,
field: F,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<RedisKey>,
F: Into<RedisKey> { ... }
fn hget<R, K, F>(
&self,
key: K,
field: F,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<RedisKey>,
F: Into<RedisKey> { ... }
fn hincrby<R, K, F>(
&self,
key: K,
field: F,
increment: i64,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<RedisKey>,
F: Into<RedisKey> { ... }
fn hincrbyfloat<R, K, F>(
&self,
key: K,
field: F,
increment: f64,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<RedisKey>,
F: Into<RedisKey> { ... }
fn hkeys<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<RedisKey> { ... }
fn hlen<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<RedisKey> { ... }
fn hmget<R, K, F>(
&self,
key: K,
fields: F,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<RedisKey>,
F: Into<MultipleKeys> { ... }
fn hmset<R, K, V>(
&self,
key: K,
values: V,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<RedisKey>,
V: TryInto<RedisMap>,
V::Error: Into<RedisError> { ... }
fn hset<R, K, V>(
&self,
key: K,
values: V,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<RedisKey>,
V: TryInto<RedisMap>,
V::Error: Into<RedisError> { ... }
fn hsetnx<R, K, F, V>(
&self,
key: K,
field: F,
value: V,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<RedisKey>,
F: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError> { ... }
fn hrandfield<R, K>(
&self,
key: K,
count: Option<(i64, bool)>,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<RedisKey> { ... }
fn hstrlen<R, K, F>(
&self,
key: K,
field: F,
) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<RedisKey>,
F: Into<RedisKey> { ... }
fn hvals<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
where R: FromRedis,
K: Into<RedisKey> { ... }
}i-hashes only.Expand description
Functions that implement the hashes interface.
Provided Methods§
sourcefn hgetall<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
fn hgetall<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
Returns all fields and values of the hash stored at key.
sourcefn hdel<R, K, F>(
&self,
key: K,
fields: F,
) -> impl Future<Output = RedisResult<R>>
fn hdel<R, K, F>( &self, key: K, fields: F, ) -> impl Future<Output = RedisResult<R>>
Removes the specified fields from the hash stored at key.
sourcefn hexists<R, K, F>(
&self,
key: K,
field: F,
) -> impl Future<Output = RedisResult<R>>
fn hexists<R, K, F>( &self, key: K, field: F, ) -> impl Future<Output = RedisResult<R>>
Returns if field is an existing field in the hash stored at key.
sourcefn hget<R, K, F>(
&self,
key: K,
field: F,
) -> impl Future<Output = RedisResult<R>>
fn hget<R, K, F>( &self, key: K, field: F, ) -> impl Future<Output = RedisResult<R>>
Returns the value associated with field in the hash stored at key.
sourcefn hincrby<R, K, F>(
&self,
key: K,
field: F,
increment: i64,
) -> impl Future<Output = RedisResult<R>>
fn hincrby<R, K, F>( &self, key: K, field: F, increment: i64, ) -> impl Future<Output = RedisResult<R>>
Increments the number stored at field in the hash stored at key by increment.
sourcefn hincrbyfloat<R, K, F>(
&self,
key: K,
field: F,
increment: f64,
) -> impl Future<Output = RedisResult<R>>
fn hincrbyfloat<R, K, F>( &self, key: K, field: F, increment: f64, ) -> impl Future<Output = RedisResult<R>>
Increment the specified field of a hash stored at key, and representing a floating point number, by the
specified increment.
sourcefn hkeys<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
fn hkeys<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
Returns all field names in the hash stored at key.
sourcefn hlen<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
fn hlen<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
Returns the number of fields contained in the hash stored at key.
sourcefn hmget<R, K, F>(
&self,
key: K,
fields: F,
) -> impl Future<Output = RedisResult<R>>
fn hmget<R, K, F>( &self, key: K, fields: F, ) -> impl Future<Output = RedisResult<R>>
Returns the values associated with the specified fields in the hash stored at key.
sourcefn hmset<R, K, V>(
&self,
key: K,
values: V,
) -> impl Future<Output = RedisResult<R>>
fn hmset<R, K, V>( &self, key: K, values: V, ) -> impl Future<Output = RedisResult<R>>
Sets the specified fields to their respective values in the hash stored at key.
sourcefn hset<R, K, V>(
&self,
key: K,
values: V,
) -> impl Future<Output = RedisResult<R>>
fn hset<R, K, V>( &self, key: K, values: V, ) -> impl Future<Output = RedisResult<R>>
Sets fields in the hash stored at key to their provided values.
sourcefn hsetnx<R, K, F, V>(
&self,
key: K,
field: F,
value: V,
) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
K: Into<RedisKey>,
F: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
fn hsetnx<R, K, F, V>(
&self,
key: K,
field: F,
value: V,
) -> impl Future<Output = RedisResult<R>>where
R: FromRedis,
K: Into<RedisKey>,
F: Into<RedisKey>,
V: TryInto<RedisValue>,
V::Error: Into<RedisError>,
Sets field in the hash stored at key to value, only if field does not yet exist.
sourcefn hrandfield<R, K>(
&self,
key: K,
count: Option<(i64, bool)>,
) -> impl Future<Output = RedisResult<R>>
fn hrandfield<R, K>( &self, key: K, count: Option<(i64, bool)>, ) -> impl Future<Output = RedisResult<R>>
When called with just the key argument, return a random field from the hash value stored at key.
If the provided count argument is positive, return an array of distinct fields.
sourcefn hstrlen<R, K, F>(
&self,
key: K,
field: F,
) -> impl Future<Output = RedisResult<R>>
fn hstrlen<R, K, F>( &self, key: K, field: F, ) -> impl Future<Output = RedisResult<R>>
Returns the string length of the value associated with field in the hash stored at key.
sourcefn hvals<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
fn hvals<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
Returns all values in the hash stored at key.