Trait rustis::commands::HyperLogLogCommands

source ·
pub trait HyperLogLogCommands<'a> {
    // Provided methods
    fn pfadd<K, E, EE>(
        self,
        key: K,
        elements: EE
    ) -> PreparedCommand<'a, Self, bool>
       where Self: Sized,
             K: SingleArg,
             E: SingleArg,
             EE: SingleArgCollection<E> { ... }
    fn pfcount<K, KK>(self, keys: KK) -> PreparedCommand<'a, Self, usize>
       where Self: Sized,
             K: SingleArg,
             KK: SingleArgCollection<K> { ... }
    fn pfmerge<D, S, SS>(
        self,
        dest_key: D,
        source_keys: SS
    ) -> PreparedCommand<'a, Self, ()>
       where Self: Sized,
             D: SingleArg,
             S: SingleArg,
             SS: SingleArgCollection<S> { ... }
}
Expand description

A group of Redis commands related to HyperLogLog

§See Also

Redis Hash Commands

Provided Methods§

source

fn pfadd<K, E, EE>( self, key: K, elements: EE ) -> PreparedCommand<'a, Self, bool>
where Self: Sized, K: SingleArg, E: SingleArg, EE: SingleArgCollection<E>,

Adds the specified elements to the specified HyperLogLog.

§Return
  • true if at least 1 HyperLogLog inFternal register was altered.
  • false otherwise.
§See Also

https://redis.io/commands/pfadd/

source

fn pfcount<K, KK>(self, keys: KK) -> PreparedCommand<'a, Self, usize>
where Self: Sized, K: SingleArg, KK: SingleArgCollection<K>,

Return the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).

§Return

The approximated number of unique elements observed via PFADD.

§See Also

https://redis.io/commands/pfcount/

source

fn pfmerge<D, S, SS>( self, dest_key: D, source_keys: SS ) -> PreparedCommand<'a, Self, ()>
where Self: Sized, D: SingleArg, S: SingleArg, SS: SingleArgCollection<S>,

Merge N different HyperLogLogs into a single one.

§See Also

https://redis.io/commands/pfmerge/

Implementors§

source§

impl<'a> HyperLogLogCommands<'a> for &'a Client

source§

impl<'a> HyperLogLogCommands<'a> for &'a mut Transaction

source§

impl<'a, 'b> HyperLogLogCommands<'a> for &'a mut Pipeline<'b>