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> { ... }
}
Available on crate feature i-hashes only.
Expand description

Functions that implement the hashes interface.

Provided Methods§

source

fn hgetall<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<RedisKey>,

Returns all fields and values of the hash stored at key.

https://redis.io/commands/hgetall

source

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.

https://redis.io/commands/hdel

source

fn hexists<R, K, F>( &self, key: K, field: F, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<RedisKey>, F: Into<RedisKey>,

Returns if field is an existing field in the hash stored at key.

https://redis.io/commands/hexists

source

fn hget<R, K, F>( &self, key: K, field: F, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<RedisKey>, F: Into<RedisKey>,

Returns the value associated with field in the hash stored at key.

https://redis.io/commands/hget

source

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>,

Increments the number stored at field in the hash stored at key by increment.

https://redis.io/commands/hincrby

source

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>,

Increment the specified field of a hash stored at key, and representing a floating point number, by the specified increment.

https://redis.io/commands/hincrbyfloat

source

fn hkeys<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<RedisKey>,

Returns all field names in the hash stored at key.

https://redis.io/commands/hkeys

source

fn hlen<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<RedisKey>,

Returns the number of fields contained in the hash stored at key.

https://redis.io/commands/hlen

source

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.

https://redis.io/commands/hmget

source

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.

https://redis.io/commands/hmset

source

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.

https://redis.io/commands/hset

source

fn hsetnx<R, K, F, V>( &self, key: K, field: F, value: V, ) -> impl Future<Output = RedisResult<R>>

Sets field in the hash stored at key to value, only if field does not yet exist.

https://redis.io/commands/hsetnx

source

fn hrandfield<R, K>( &self, key: K, count: Option<(i64, bool)>, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<RedisKey>,

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.

https://redis.io/commands/hrandfield

source

fn hstrlen<R, K, F>( &self, key: K, field: F, ) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<RedisKey>, F: Into<RedisKey>,

Returns the string length of the value associated with field in the hash stored at key.

https://redis.io/commands/hstrlen

source

fn hvals<R, K>(&self, key: K) -> impl Future<Output = RedisResult<R>>
where R: FromRedis, K: Into<RedisKey>,

Returns all values in the hash stored at key.

https://redis.io/commands/hvals

Object Safety§

This trait is not object safe.

Implementors§