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§

source§

impl<S: Debug, V: Debug> Debug for SetCommand<S, V>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<S, V> Display for SetCommand<S, V>where S: Display, V: Display,

source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.