HyperLogLogCommands

Trait HyperLogLogCommands 

Source
pub trait HyperLogLogCommands<'a>: Sized {
    // Provided methods
    fn pfadd(
        self,
        key: impl Args,
        elements: impl Args,
    ) -> PreparedCommand<'a, Self, bool> { ... }
    fn pfcount(self, keys: impl Args) -> PreparedCommand<'a, Self, usize> { ... }
    fn pfmerge(
        self,
        dest_key: impl Args,
        source_keys: impl Args,
    ) -> PreparedCommand<'a, Self, ()> { ... }
}
Expand description

A group of Redis commands related to HyperLogLog

§See Also

Redis Hash Commands

Provided Methods§

Source

fn pfadd( self, key: impl Args, elements: impl Args, ) -> PreparedCommand<'a, Self, bool>

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(self, keys: impl Args) -> PreparedCommand<'a, Self, usize>

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( self, dest_key: impl Args, source_keys: impl Args, ) -> PreparedCommand<'a, Self, ()>

Merge N different HyperLogLogs into a single one.

§See Also

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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

Source§

impl<'a> HyperLogLogCommands<'a> for &'a mut Pipeline<'_>

Source§

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