pub trait HashCommands<'a> {
Show 17 methods
// Provided methods
fn hdel<K, F, C>(
self,
key: K,
fields: C,
) -> PreparedCommand<'a, Self, usize>
where Self: Sized,
K: SingleArg,
F: SingleArg,
C: SingleArgCollection<F> { ... }
fn hexists<K, F>(self, key: K, field: F) -> PreparedCommand<'a, Self, bool>
where Self: Sized,
K: SingleArg,
F: SingleArg { ... }
fn hget<K, F, V>(self, key: K, field: F) -> PreparedCommand<'a, Self, V>
where Self: Sized,
K: SingleArg,
F: SingleArg,
V: PrimitiveResponse { ... }
fn hgetall<K, F, V, A>(self, key: K) -> PreparedCommand<'a, Self, A>
where Self: Sized,
K: SingleArg,
F: PrimitiveResponse,
V: PrimitiveResponse,
A: KeyValueCollectionResponse<F, V> { ... }
fn hincrby<K, F>(
self,
key: K,
field: F,
increment: i64,
) -> PreparedCommand<'a, Self, i64>
where Self: Sized,
K: SingleArg,
F: SingleArg { ... }
fn hincrbyfloat<K, F>(
self,
key: K,
field: F,
increment: f64,
) -> PreparedCommand<'a, Self, f64>
where Self: Sized,
K: SingleArg,
F: SingleArg { ... }
fn hkeys<K, F, A>(self, key: K) -> PreparedCommand<'a, Self, A>
where Self: Sized,
K: SingleArg,
F: PrimitiveResponse + DeserializeOwned,
A: CollectionResponse<F> + DeserializeOwned { ... }
fn hlen<K>(self, key: K) -> PreparedCommand<'a, Self, usize>
where Self: Sized,
K: SingleArg { ... }
fn hmget<K, F, V, C, A>(
self,
key: K,
fields: C,
) -> PreparedCommand<'a, Self, A>
where Self: Sized,
K: SingleArg,
F: SingleArg,
C: SingleArgCollection<F>,
V: PrimitiveResponse + DeserializeOwned,
A: CollectionResponse<V> + DeserializeOwned { ... }
fn hrandfield<K, F>(self, key: K) -> PreparedCommand<'a, Self, F>
where Self: Sized,
K: SingleArg,
F: PrimitiveResponse { ... }
fn hrandfields<K, F, A>(
self,
key: K,
count: isize,
) -> PreparedCommand<'a, Self, A>
where Self: Sized,
K: SingleArg,
F: PrimitiveResponse + DeserializeOwned,
A: CollectionResponse<F> + DeserializeOwned { ... }
fn hrandfields_with_values<K, F, V, A>(
self,
key: K,
count: isize,
) -> PreparedCommand<'a, Self, A>
where Self: Sized,
K: SingleArg,
F: PrimitiveResponse,
V: PrimitiveResponse,
A: KeyValueCollectionResponse<F, V> { ... }
fn hscan<K, F, V>(
self,
key: K,
cursor: u64,
options: HScanOptions,
) -> PreparedCommand<'a, Self, HScanResult<F, V>>
where Self: Sized,
K: SingleArg,
F: PrimitiveResponse + DeserializeOwned,
V: PrimitiveResponse + DeserializeOwned { ... }
fn hset<K, F, V, I>(
self,
key: K,
items: I,
) -> PreparedCommand<'a, Self, usize>
where Self: Sized,
K: SingleArg,
F: SingleArg,
V: SingleArg,
I: KeyValueArgsCollection<F, V> { ... }
fn hsetnx<K, F, V>(
self,
key: K,
field: F,
value: V,
) -> PreparedCommand<'a, Self, bool>
where Self: Sized,
K: SingleArg,
F: SingleArg,
V: SingleArg { ... }
fn hstrlen<K, F>(self, key: K, field: F) -> PreparedCommand<'a, Self, usize>
where Self: Sized,
K: SingleArg,
F: SingleArg { ... }
fn hvals<K, V, A>(self, key: K) -> PreparedCommand<'a, Self, A>
where Self: Sized,
K: SingleArg,
V: PrimitiveResponse + DeserializeOwned,
A: CollectionResponse<V> + DeserializeOwned { ... }
}
Expand description
Provided Methods§
Sourcefn hdel<K, F, C>(self, key: K, fields: C) -> PreparedCommand<'a, Self, usize>
fn hdel<K, F, C>(self, key: K, fields: C) -> PreparedCommand<'a, Self, usize>
Sourcefn hexists<K, F>(self, key: K, field: F) -> PreparedCommand<'a, Self, bool>
fn hexists<K, F>(self, key: K, field: F) -> PreparedCommand<'a, Self, bool>
Sourcefn hget<K, F, V>(self, key: K, field: F) -> PreparedCommand<'a, Self, V>
fn hget<K, F, V>(self, key: K, field: F) -> PreparedCommand<'a, Self, V>
Sourcefn hgetall<K, F, V, A>(self, key: K) -> PreparedCommand<'a, Self, A>where
Self: Sized,
K: SingleArg,
F: PrimitiveResponse,
V: PrimitiveResponse,
A: KeyValueCollectionResponse<F, V>,
fn hgetall<K, F, V, A>(self, key: K) -> PreparedCommand<'a, Self, A>where
Self: Sized,
K: SingleArg,
F: PrimitiveResponse,
V: PrimitiveResponse,
A: KeyValueCollectionResponse<F, V>,
Sourcefn hincrby<K, F>(
self,
key: K,
field: F,
increment: i64,
) -> PreparedCommand<'a, Self, i64>
fn hincrby<K, F>( self, key: K, field: F, increment: i64, ) -> PreparedCommand<'a, Self, i64>
Sourcefn hincrbyfloat<K, F>(
self,
key: K,
field: F,
increment: f64,
) -> PreparedCommand<'a, Self, f64>
fn hincrbyfloat<K, F>( self, key: K, field: F, increment: f64, ) -> PreparedCommand<'a, Self, f64>
Sourcefn hkeys<K, F, A>(self, key: K) -> PreparedCommand<'a, Self, A>where
Self: Sized,
K: SingleArg,
F: PrimitiveResponse + DeserializeOwned,
A: CollectionResponse<F> + DeserializeOwned,
fn hkeys<K, F, A>(self, key: K) -> PreparedCommand<'a, Self, A>where
Self: Sized,
K: SingleArg,
F: PrimitiveResponse + DeserializeOwned,
A: CollectionResponse<F> + DeserializeOwned,
Sourcefn hlen<K>(self, key: K) -> PreparedCommand<'a, Self, usize>
fn hlen<K>(self, key: K) -> PreparedCommand<'a, Self, usize>
Sourcefn hmget<K, F, V, C, A>(self, key: K, fields: C) -> PreparedCommand<'a, Self, A>where
Self: Sized,
K: SingleArg,
F: SingleArg,
C: SingleArgCollection<F>,
V: PrimitiveResponse + DeserializeOwned,
A: CollectionResponse<V> + DeserializeOwned,
fn hmget<K, F, V, C, A>(self, key: K, fields: C) -> PreparedCommand<'a, Self, A>where
Self: Sized,
K: SingleArg,
F: SingleArg,
C: SingleArgCollection<F>,
V: PrimitiveResponse + DeserializeOwned,
A: CollectionResponse<V> + DeserializeOwned,
Sourcefn hrandfield<K, F>(self, key: K) -> PreparedCommand<'a, Self, F>
fn hrandfield<K, F>(self, key: K) -> PreparedCommand<'a, Self, F>
Sourcefn hrandfields<K, F, A>(
self,
key: K,
count: isize,
) -> PreparedCommand<'a, Self, A>where
Self: Sized,
K: SingleArg,
F: PrimitiveResponse + DeserializeOwned,
A: CollectionResponse<F> + DeserializeOwned,
fn hrandfields<K, F, A>(
self,
key: K,
count: isize,
) -> PreparedCommand<'a, Self, A>where
Self: Sized,
K: SingleArg,
F: PrimitiveResponse + DeserializeOwned,
A: CollectionResponse<F> + DeserializeOwned,
return random fields from the hash value stored at key.
§Return
- If the provided count argument is positive, return an array of distinct fields. The array’s length is either count or the hash’s number of fields (HLEN), whichever is lower.
- If called with a negative count, the behavior changes and the command is allowed to return the same field multiple times. In this case, the number of returned fields is the absolute value of the specified count.
§See Also
Sourcefn hrandfields_with_values<K, F, V, A>(
self,
key: K,
count: isize,
) -> PreparedCommand<'a, Self, A>where
Self: Sized,
K: SingleArg,
F: PrimitiveResponse,
V: PrimitiveResponse,
A: KeyValueCollectionResponse<F, V>,
fn hrandfields_with_values<K, F, V, A>(
self,
key: K,
count: isize,
) -> PreparedCommand<'a, Self, A>where
Self: Sized,
K: SingleArg,
F: PrimitiveResponse,
V: PrimitiveResponse,
A: KeyValueCollectionResponse<F, V>,
return random fields from the hash value stored at key.
§Return
- If the provided count argument is positive, return an array of distinct fields. The array’s length is either count or the hash’s number of fields (HLEN), whichever is lower.
- If called with a negative count, the behavior changes and the command is allowed to return the same field multiple times. In this case, the number of returned fields is the absolute value of the specified count. The optional WITHVALUES modifier changes the reply so it includes the respective values of the randomly selected hash fields.