pub trait SetsInterface: ClientLike + Sized {
Show 15 methods
// Provided methods
fn sadd<R, K, V>(
&self,
key: K,
members: V,
) -> impl Future<Output = FredResult<R>> + Send
where R: FromValue,
K: Into<Key> + Send,
V: TryInto<MultipleValues> + Send,
V::Error: Into<Error> + Send { ... }
fn scard<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
where R: FromValue,
K: Into<Key> + Send { ... }
fn sdiff<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
where R: FromValue,
K: Into<MultipleKeys> + Send { ... }
fn sdiffstore<R, D, K>(
&self,
dest: D,
keys: K,
) -> impl Future<Output = FredResult<R>> + Send
where R: FromValue,
D: Into<Key> + Send,
K: Into<MultipleKeys> + Send { ... }
fn sinter<R, K>(
&self,
keys: K,
) -> impl Future<Output = FredResult<R>> + Send
where R: FromValue,
K: Into<MultipleKeys> + Send { ... }
fn sinterstore<R, D, K>(
&self,
dest: D,
keys: K,
) -> impl Future<Output = FredResult<R>> + Send
where R: FromValue,
D: Into<Key> + Send,
K: Into<MultipleKeys> + Send { ... }
fn sismember<R, K, V>(
&self,
key: K,
member: V,
) -> impl Future<Output = FredResult<R>> + Send
where R: FromValue,
K: Into<Key> + Send,
V: TryInto<Value> + Send,
V::Error: Into<Error> + Send { ... }
fn smismember<R, K, V>(
&self,
key: K,
members: V,
) -> impl Future<Output = FredResult<R>> + Send
where R: FromValue,
K: Into<Key> + Send,
V: TryInto<MultipleValues> + Send,
V::Error: Into<Error> + Send { ... }
fn smembers<R, K>(
&self,
key: K,
) -> impl Future<Output = FredResult<R>> + Send
where R: FromValue,
K: Into<Key> + Send { ... }
fn smove<R, S, D, V>(
&self,
source: S,
dest: D,
member: V,
) -> impl Future<Output = FredResult<R>> + Send
where R: FromValue,
S: Into<Key> + Send,
D: Into<Key> + Send,
V: TryInto<Value> + Send,
V::Error: Into<Error> + Send { ... }
fn spop<R, K>(
&self,
key: K,
count: Option<usize>,
) -> impl Future<Output = FredResult<R>> + Send
where R: FromValue,
K: Into<Key> + Send { ... }
fn srandmember<R, K>(
&self,
key: K,
count: Option<usize>,
) -> impl Future<Output = FredResult<R>> + Send
where R: FromValue,
K: Into<Key> + Send { ... }
fn srem<R, K, V>(
&self,
key: K,
members: V,
) -> impl Future<Output = FredResult<R>> + Send
where R: FromValue,
K: Into<Key> + Send,
V: TryInto<MultipleValues> + Send,
V::Error: Into<Error> + Send { ... }
fn sunion<R, K>(
&self,
keys: K,
) -> impl Future<Output = FredResult<R>> + Send
where R: FromValue,
K: Into<MultipleKeys> + Send { ... }
fn sunionstore<R, D, K>(
&self,
dest: D,
keys: K,
) -> impl Future<Output = FredResult<R>> + Send
where R: FromValue,
D: Into<Key> + Send,
K: Into<MultipleKeys> + Send { ... }
}i-sets only.Expand description
Functions that implement the sets interface.
Provided Methods§
Sourcefn sadd<R, K, V>(
&self,
key: K,
members: V,
) -> impl Future<Output = FredResult<R>> + Send
fn sadd<R, K, V>( &self, key: K, members: V, ) -> impl Future<Output = FredResult<R>> + Send
Add the specified members to the set stored at key.
Sourcefn scard<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn scard<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Returns the set cardinality (number of elements) of the set stored at key.
Sourcefn sdiff<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
fn sdiff<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
Returns the members of the set resulting from the difference between the first set and all the successive sets.
Sourcefn sdiffstore<R, D, K>(
&self,
dest: D,
keys: K,
) -> impl Future<Output = FredResult<R>> + Send
fn sdiffstore<R, D, K>( &self, dest: D, keys: K, ) -> impl Future<Output = FredResult<R>> + Send
This command is equal to SDIFF, but instead of returning the resulting set, it is stored in destination.
Sourcefn sinter<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
fn sinter<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
Returns the members of the set resulting from the intersection of all the given sets.
Sourcefn sinterstore<R, D, K>(
&self,
dest: D,
keys: K,
) -> impl Future<Output = FredResult<R>> + Send
fn sinterstore<R, D, K>( &self, dest: D, keys: K, ) -> impl Future<Output = FredResult<R>> + Send
This command is equal to SINTER, but instead of returning the resulting set, it is stored in destination.
Sourcefn sismember<R, K, V>(
&self,
key: K,
member: V,
) -> impl Future<Output = FredResult<R>> + Send
fn sismember<R, K, V>( &self, key: K, member: V, ) -> impl Future<Output = FredResult<R>> + Send
Returns if member is a member of the set stored at key.
Sourcefn smismember<R, K, V>(
&self,
key: K,
members: V,
) -> impl Future<Output = FredResult<R>> + Send
fn smismember<R, K, V>( &self, key: K, members: V, ) -> impl Future<Output = FredResult<R>> + Send
Returns whether each member is a member of the set stored at key.
Sourcefn smembers<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
fn smembers<R, K>(&self, key: K) -> impl Future<Output = FredResult<R>> + Send
Returns all the members of the set value stored at key.
Sourcefn smove<R, S, D, V>(
&self,
source: S,
dest: D,
member: V,
) -> impl Future<Output = FredResult<R>> + Send
fn smove<R, S, D, V>( &self, source: S, dest: D, member: V, ) -> impl Future<Output = FredResult<R>> + Send
Move member from the set at source to the set at destination.
Sourcefn spop<R, K>(
&self,
key: K,
count: Option<usize>,
) -> impl Future<Output = FredResult<R>> + Send
fn spop<R, K>( &self, key: K, count: Option<usize>, ) -> impl Future<Output = FredResult<R>> + Send
Removes and returns one or more random members from the set value store at key.
Sourcefn srandmember<R, K>(
&self,
key: K,
count: Option<usize>,
) -> impl Future<Output = FredResult<R>> + Send
fn srandmember<R, K>( &self, key: K, count: Option<usize>, ) -> impl Future<Output = FredResult<R>> + Send
When called with just the key argument, return a random element from the set value stored at key.
If the provided count argument is positive, return an array of distinct elements. The array’s length is either
count or the set’s cardinality (SCARD), whichever is lower.
Sourcefn srem<R, K, V>(
&self,
key: K,
members: V,
) -> impl Future<Output = FredResult<R>> + Send
fn srem<R, K, V>( &self, key: K, members: V, ) -> impl Future<Output = FredResult<R>> + Send
Remove the specified members from the set stored at key.
Sourcefn sunion<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
fn sunion<R, K>(&self, keys: K) -> impl Future<Output = FredResult<R>> + Send
Returns the members of the set resulting from the union of all the given sets.
Sourcefn sunionstore<R, D, K>(
&self,
dest: D,
keys: K,
) -> impl Future<Output = FredResult<R>> + Send
fn sunionstore<R, D, K>( &self, dest: D, keys: K, ) -> impl Future<Output = FredResult<R>> + Send
This command is equal to SUNION, but instead of returning the resulting set, it is stored in destination.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.