pub trait SetCommands {
Show 17 methods
// Provided methods
fn sadd<K, M, C>(
&mut self,
key: K,
members: C,
) -> PreparedCommand<'_, Self, usize>
where Self: Sized,
K: Into<CommandArg>,
M: Into<CommandArg>,
C: SingleArgOrCollection<M> { ... }
fn scard<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>
where Self: Sized,
K: Into<CommandArg> { ... }
fn sdiff<K, M, C, A>(&mut self, keys: C) -> PreparedCommand<'_, Self, A>
where Self: Sized,
K: Into<CommandArg>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
A: FromSingleValueArray<M> { ... }
fn sdiffstore<D, K, C>(
&mut self,
destination: D,
keys: C,
) -> PreparedCommand<'_, Self, usize>
where Self: Sized,
D: Into<CommandArg>,
K: Into<CommandArg>,
C: SingleArgOrCollection<K> { ... }
fn sinter<K, M, C, A>(&mut self, keys: C) -> PreparedCommand<'_, Self, A>
where Self: Sized,
K: Into<CommandArg>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
A: FromSingleValueArray<M> { ... }
fn sintercard<K, C>(
&mut self,
keys: C,
limit: usize,
) -> PreparedCommand<'_, Self, usize>
where Self: Sized,
K: Into<CommandArg>,
C: SingleArgOrCollection<K> { ... }
fn sinterstore<D, K, C>(
&mut self,
destination: D,
keys: C,
) -> PreparedCommand<'_, Self, usize>
where Self: Sized,
D: Into<CommandArg>,
K: Into<CommandArg>,
C: SingleArgOrCollection<K> { ... }
fn sismember<K, M>(
&mut self,
key: K,
member: M,
) -> PreparedCommand<'_, Self, bool>
where Self: Sized,
K: Into<CommandArg>,
M: Into<CommandArg> { ... }
fn smembers<K, M, A>(&mut self, key: K) -> PreparedCommand<'_, Self, A>
where Self: Sized,
K: Into<CommandArg>,
M: FromValue + Eq + Hash,
A: FromSingleValueArray<M> { ... }
fn smismember<K, M, C>(
&mut self,
key: K,
members: C,
) -> PreparedCommand<'_, Self, Vec<bool>>
where Self: Sized,
K: Into<CommandArg>,
M: Into<CommandArg>,
C: SingleArgOrCollection<M> { ... }
fn smove<S, D, M>(
&mut self,
source: S,
destination: D,
member: M,
) -> PreparedCommand<'_, Self, bool>
where Self: Sized,
S: Into<CommandArg>,
D: Into<CommandArg>,
M: Into<CommandArg> { ... }
fn spop<K, M, A>(
&mut self,
key: K,
count: usize,
) -> PreparedCommand<'_, Self, A>
where Self: Sized,
K: Into<CommandArg>,
M: FromValue + Eq + Hash,
A: FromSingleValueArray<M> { ... }
fn srandmember<K, M, A>(
&mut self,
key: K,
count: usize,
) -> PreparedCommand<'_, Self, A>
where Self: Sized,
K: Into<CommandArg>,
M: FromValue + Eq + Hash,
A: FromSingleValueArray<M> { ... }
fn srem<K, M, C>(
&mut self,
key: K,
members: C,
) -> PreparedCommand<'_, Self, usize>
where Self: Sized,
K: Into<CommandArg>,
M: Into<CommandArg>,
C: SingleArgOrCollection<M> { ... }
fn sscan<K, M>(
&mut self,
key: K,
cursor: u64,
options: SScanOptions,
) -> PreparedCommand<'_, Self, (u64, Vec<M>)>
where Self: Sized,
K: Into<CommandArg>,
M: FromValue { ... }
fn sunion<K, M, C, A>(&mut self, keys: C) -> PreparedCommand<'_, Self, A>
where Self: Sized,
K: Into<CommandArg>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
A: FromSingleValueArray<M> { ... }
fn sunionstore<D, K, C>(
&mut self,
destination: D,
keys: C,
) -> PreparedCommand<'_, Self, usize>
where Self: Sized,
D: Into<CommandArg>,
K: Into<CommandArg>,
C: SingleArgOrCollection<K> { ... }
}
Expand description
Provided Methods§
Sourcefn sadd<K, M, C>(
&mut self,
key: K,
members: C,
) -> PreparedCommand<'_, Self, usize>
fn sadd<K, M, C>( &mut self, key: K, members: C, ) -> PreparedCommand<'_, Self, usize>
Sourcefn scard<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>
fn scard<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>
Sourcefn sdiff<K, M, C, A>(&mut self, keys: C) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<CommandArg>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
A: FromSingleValueArray<M>,
fn sdiff<K, M, C, A>(&mut self, keys: C) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<CommandArg>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
A: FromSingleValueArray<M>,
Sourcefn sdiffstore<D, K, C>(
&mut self,
destination: D,
keys: C,
) -> PreparedCommand<'_, Self, usize>
fn sdiffstore<D, K, C>( &mut self, destination: D, keys: C, ) -> PreparedCommand<'_, Self, usize>
Sourcefn sinter<K, M, C, A>(&mut self, keys: C) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<CommandArg>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
A: FromSingleValueArray<M>,
fn sinter<K, M, C, A>(&mut self, keys: C) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<CommandArg>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
A: FromSingleValueArray<M>,
Sourcefn sintercard<K, C>(
&mut self,
keys: C,
limit: usize,
) -> PreparedCommand<'_, Self, usize>
fn sintercard<K, C>( &mut self, keys: C, limit: usize, ) -> PreparedCommand<'_, Self, usize>
This command is similar to sinter, but instead of returning the result set, it returns just the cardinality of the result.
limit: if the intersection cardinality reaches limit partway through the computation, the algorithm will exit and yield limit as the cardinality. 0 means unlimited
§Return
A list with members of the resulting set.
§See Also
Sourcefn sinterstore<D, K, C>(
&mut self,
destination: D,
keys: C,
) -> PreparedCommand<'_, Self, usize>
fn sinterstore<D, K, C>( &mut self, destination: D, keys: C, ) -> PreparedCommand<'_, Self, usize>
Sourcefn sismember<K, M>(
&mut self,
key: K,
member: M,
) -> PreparedCommand<'_, Self, bool>
fn sismember<K, M>( &mut self, key: K, member: M, ) -> PreparedCommand<'_, Self, bool>
Sourcefn smembers<K, M, A>(&mut self, key: K) -> PreparedCommand<'_, Self, A>
fn smembers<K, M, A>(&mut self, key: K) -> PreparedCommand<'_, Self, A>
Returns all the members of the set value stored at key.