Enum kramer::SetCommand
source · pub enum SetCommand<S, V> {
Add(S, Arity<V>),
Rem(S, Arity<V>),
Card(S),
Union(Arity<S>),
Inter(Arity<S>),
IsMember(S, V),
Diff(Arity<S>),
Members(S),
Pop(S, u64),
}
Expand description
The SetCommand
is used for working with redis keys that are sets: unique collections
of values.
Variants§
Add(S, Arity<V>)
Adds a member(s) to a set.
Rem(S, Arity<V>)
Removes a member(s) to a set.
Card(S)
Returns the amount of members in the set.
Union(Arity<S>)
Returns the members of the set resulting from the union of all the given sets.
Inter(Arity<S>)
Returns the members of the set resulting from the intersection of all the given sets.
IsMember(S, V)
Returns whether or not the given value is a member of the set.
Diff(Arity<S>)
Returns the members of the set resulting from the difference of all the given sets.
Members(S)
Returns the members of the set.
Pop(S, u64)
Removes elements from the set.
Trait Implementations§
Auto Trait Implementations§
impl<S, V> RefUnwindSafe for SetCommand<S, V>where S: RefUnwindSafe, V: RefUnwindSafe,
impl<S, V> Send for SetCommand<S, V>where S: Send, V: Send,
impl<S, V> Sync for SetCommand<S, V>where S: Sync, V: Sync,
impl<S, V> Unpin for SetCommand<S, V>where S: Unpin, V: Unpin,
impl<S, V> UnwindSafe for SetCommand<S, V>where S: UnwindSafe, V: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more