Trait redis_driver::SetCommands
source · pub trait SetCommands {
Show 17 methods
fn sadd<K, M, C>(
&mut self,
key: K,
members: C
) -> PreparedCommand<'_, Self, usize>
where
Self: Sized,
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
{ ... }
fn scard<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>
where
Self: Sized,
K: Into<BulkString>,
{ ... }
fn sdiff<K, M, C, A>(&mut self, keys: C) -> PreparedCommand<'_, Self, A>
where
Self: Sized,
K: Into<BulkString>,
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<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
{ ... }
fn sinter<K, M, C, A>(&mut self, keys: C) -> PreparedCommand<'_, Self, A>
where
Self: Sized,
K: Into<BulkString>,
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<BulkString>,
C: SingleArgOrCollection<K>,
{ ... }
fn sinterstore<D, K, C>(
&mut self,
destination: D,
keys: C
) -> PreparedCommand<'_, Self, usize>
where
Self: Sized,
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
{ ... }
fn sismember<K, M>(
&mut self,
key: K,
member: M
) -> PreparedCommand<'_, Self, bool>
where
Self: Sized,
K: Into<BulkString>,
M: Into<BulkString>,
{ ... }
fn smembers<K, M, A>(&mut self, key: K) -> PreparedCommand<'_, Self, A>
where
Self: Sized,
K: Into<BulkString>,
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<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
{ ... }
fn smove<S, D, M>(
&mut self,
source: S,
destination: D,
member: M
) -> PreparedCommand<'_, Self, bool>
where
Self: Sized,
S: Into<BulkString>,
D: Into<BulkString>,
M: Into<BulkString>,
{ ... }
fn spop<K, M, A>(
&mut self,
key: K,
count: usize
) -> PreparedCommand<'_, Self, A>
where
Self: Sized,
K: Into<BulkString>,
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<BulkString>,
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<BulkString>,
M: Into<BulkString>,
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<BulkString>,
M: FromValue,
{ ... }
fn sunion<K, M, C, A>(&mut self, keys: C) -> PreparedCommand<'_, Self, A>
where
Self: Sized,
K: Into<BulkString>,
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<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
{ ... }
}
Expand description
Provided Methods
sourcefn sadd<K, M, C>(
&mut self,
key: K,
members: C
) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
fn sadd<K, M, C>(
&mut self,
key: K,
members: C
) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
sourcefn scard<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
K: Into<BulkString>,
fn scard<K>(&mut self, key: K) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
K: Into<BulkString>,
sourcefn sdiff<K, M, C, A>(&mut self, keys: C) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<BulkString>,
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<BulkString>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
A: FromSingleValueArray<M>,
sourcefn sdiffstore<D, K, C>(
&mut self,
destination: D,
keys: C
) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn sdiffstore<D, K, C>(
&mut self,
destination: D,
keys: C
) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
sourcefn sinter<K, M, C, A>(&mut self, keys: C) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<BulkString>,
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<BulkString>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
A: FromSingleValueArray<M>,
sourcefn sintercard<K, C>(
&mut self,
keys: C,
limit: usize
) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn sintercard<K, C>(
&mut self,
keys: C,
limit: usize
) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
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>where
Self: Sized,
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn sinterstore<D, K, C>(
&mut self,
destination: D,
keys: C
) -> PreparedCommand<'_, Self, usize>where
Self: Sized,
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
sourcefn sismember<K, M>(
&mut self,
key: K,
member: M
) -> PreparedCommand<'_, Self, bool>where
Self: Sized,
K: Into<BulkString>,
M: Into<BulkString>,
fn sismember<K, M>(
&mut self,
key: K,
member: M
) -> PreparedCommand<'_, Self, bool>where
Self: Sized,
K: Into<BulkString>,
M: Into<BulkString>,
sourcefn smembers<K, M, A>(&mut self, key: K) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<BulkString>,
M: FromValue + Eq + Hash,
A: FromSingleValueArray<M>,
fn smembers<K, M, A>(&mut self, key: K) -> PreparedCommand<'_, Self, A>where
Self: Sized,
K: Into<BulkString>,
M: FromValue + Eq + Hash,
A: FromSingleValueArray<M>,
Returns all the members of the set value stored at key.