pub struct SharedHyperLogLog { /* private fields */ }Implementations§
pub fn create(path: impl AsRef<Path>, precision: u8) -> Result<Self, HLLError>
pub fn open( path: impl AsRef<Path>, expected_precision: u8, ) -> Result<Self, HLLError>
pub fn precision(&self) -> u8
pub fn n_registers(&self) -> u32
Sourcepub fn estimate(&self) -> u64
pub fn estimate(&self) -> u64
Estimate cardinality (distinct count) via harmonic mean with bias correction.
pub fn flush(&self) -> Result<(), HLLError>
pub fn flush_async(&self) -> Result<(), HLLError>
Trait Implementations§
fn header(&self) -> &HandshakeHeader
fn ring(&self) -> &ObservationRing
fn make_policy(&self) -> Box<dyn Policy>
Source§fn apply_migration(&self, new_tag: u32)
fn apply_migration(&self, new_tag: u32)
Called by the sidecar when the policy returns a new strategy
tag. Default implementation: just set the tag on the header.
Primitives that need heavier migration (data-layout swap)
override this to perform the swap before (or after) updating
the tag.
Auto Trait Implementations§
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