Skip to main content

StoreCountObserver

Trait StoreCountObserver 

Source
pub trait StoreCountObserver:
    Debug
    + Send
    + Sync {
    // Required methods
    fn changed(&self);
    fn flushed(&self, store: &str, batch_rows: Option<u64>);
}
Expand description

Receives counter increments and explicit flush calls at the counting boundary.

The callback must not inspect history or perform work for ordinary increments. Flush observations describe the boundary call, including a call that fails.

Required Methods§

Source

fn changed(&self)

Called after an actual counter increment, with no publication origin.

Source

fn flushed(&self, store: &str, batch_rows: Option<u64>)

Called once per explicit flush; a row count is absent unless the boundary knows it.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§