pub trait GroupStore: Send + Sync {
// Required methods
fn append(&self, key: &str, msg: Message) -> (Vec<Message>, Instant);
fn take(&self, key: &str) -> Option<Vec<Message>>;
fn clear(&self);
}Expand description
Pluggable storage for in-progress correlation groups. The default InMemoryGroupStore keeps
groups in a Mutex<HashMap>; persistent implementations can plug in via Aggregator::with_store.
Required Methods§
Sourcefn append(&self, key: &str, msg: Message) -> (Vec<Message>, Instant)
fn append(&self, key: &str, msg: Message) -> (Vec<Message>, Instant)
Append msg to the group keyed by key, returning a snapshot of the group (post-append)
and the Instant the group was first seen.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".