Trait HyperLogLogCommands

Source
pub trait HyperLogLogCommands {
    // Provided methods
    fn pfadd<K, E, EE>(
        &mut self,
        key: K,
        elements: EE,
    ) -> PreparedCommand<'_, Self, bool>
       where Self: Sized,
             K: Into<CommandArg>,
             E: Into<CommandArg>,
             EE: SingleArgOrCollection<E> { ... }
    fn pfcount<K, KK>(&mut self, keys: KK) -> PreparedCommand<'_, Self, usize>
       where Self: Sized,
             K: Into<CommandArg>,
             KK: SingleArgOrCollection<K> { ... }
    fn pfmerge<D, S, SS>(
        &mut self,
        dest_key: D,
        source_keys: SS,
    ) -> PreparedCommand<'_, Self, ()>
       where Self: Sized,
             D: Into<CommandArg>,
             S: Into<CommandArg>,
             SS: SingleArgOrCollection<S> { ... }
}
Expand description

A group of Redis commands related to HyperLogLog

§See Also

Redis Hash Commands

Provided Methods§

Source

fn pfadd<K, E, EE>( &mut self, key: K, elements: EE, ) -> PreparedCommand<'_, Self, bool>
where Self: Sized, K: Into<CommandArg>, E: Into<CommandArg>, EE: SingleArgOrCollection<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>(&mut self, keys: KK) -> PreparedCommand<'_, Self, usize>
where Self: Sized, K: Into<CommandArg>, KK: SingleArgOrCollection<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>( &mut self, dest_key: D, source_keys: SS, ) -> PreparedCommand<'_, Self, ()>
where Self: Sized, D: Into<CommandArg>, S: Into<CommandArg>, SS: SingleArgOrCollection<S>,

Merge N different HyperLogLogs into a single one.

§See Also

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

Implementors§