Trait redis_driver::SetCommands
source · [−]pub trait SetCommands: CommandSend {
Show 17 methods
fn sadd<K, M, C>(
&self,
key: K,
members: C
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
{ ... }
fn scard<K>(
&self,
key: K
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
where
K: Into<BulkString>,
{ ... }
fn sdiff<K, M, C>(
&self,
keys: C
) -> Pin<Box<dyn Future<Output = Result<HashSet<M>>> + '_>>
where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
{ ... }
fn sdiffstore<D, K, C>(
&self,
destination: D,
keys: C
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
{ ... }
fn sinter<K, M, C>(
&self,
keys: C
) -> Pin<Box<dyn Future<Output = Result<HashSet<M>>> + '_>>
where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
{ ... }
fn sintercard<K, C>(
&self,
keys: C,
limit: usize
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
{ ... }
fn sinterstore<D, K, C>(
&self,
destination: D,
keys: C
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
{ ... }
fn sismember<K, M>(
&self,
key: K,
member: M
) -> Pin<Box<dyn Future<Output = Result<bool>> + '_>>
where
K: Into<BulkString>,
M: Into<BulkString>,
{ ... }
fn smembers<K, M>(
&self,
key: K
) -> Pin<Box<dyn Future<Output = Result<HashSet<M>>> + '_>>
where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
{ ... }
fn smismember<K, M, C>(
&self,
key: K,
members: C
) -> Pin<Box<dyn Future<Output = Result<Vec<bool>>> + '_>>
where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
{ ... }
fn smove<S, D, M>(
&self,
source: S,
destination: D,
member: M
) -> Pin<Box<dyn Future<Output = Result<bool>> + '_>>
where
S: Into<BulkString>,
D: Into<BulkString>,
M: Into<BulkString>,
{ ... }
fn spop<K, M>(
&self,
key: K,
count: usize
) -> Pin<Box<dyn Future<Output = Result<HashSet<M>>> + '_>>
where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
{ ... }
fn srandmember<K, M>(
&self,
key: K,
count: usize
) -> Pin<Box<dyn Future<Output = Result<HashSet<M>>> + '_>>
where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
{ ... }
fn srem<K, M, C>(
&self,
key: K,
members: C
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
{ ... }
fn sscan<K>(&self, key: K, cursor: u64) -> SScan<'_, Self>
where
K: Into<BulkString>,
{ ... }
fn sunion<K, M, C>(
&self,
keys: C
) -> Pin<Box<dyn Future<Output = Result<HashSet<M>>> + '_>>
where
K: Into<BulkString>,
M: FromValue + Eq + Hash,
C: SingleArgOrCollection<K>,
{ ... }
fn sunionstore<D, K, C>(
&self,
destination: D,
keys: C
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>
where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
{ ... }
}
Expand description
Provided Methods
sourcefn sadd<K, M, C>(
&self,
key: K,
members: C
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
fn sadd<K, M, C>(
&self,
key: K,
members: C
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
M: Into<BulkString>,
C: SingleArgOrCollection<M>,
sourcefn sdiffstore<D, K, C>(
&self,
destination: D,
keys: C
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn sdiffstore<D, K, C>(
&self,
destination: D,
keys: C
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
sourcefn sintercard<K, C>(
&self,
keys: C,
limit: usize
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn sintercard<K, C>(
&self,
keys: C,
limit: usize
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
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>(
&self,
destination: D,
keys: C
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
fn sinterstore<D, K, C>(
&self,
destination: D,
keys: C
) -> Pin<Box<dyn Future<Output = Result<usize>> + '_>>where
D: Into<BulkString>,
K: Into<BulkString>,
C: SingleArgOrCollection<K>,
Returns all the members of the set value stored at key.