pub trait MemoryObserver: Send + Sync {
// Provided methods
fn on_remembered(&self, _fact: &Remembered, _input: &RememberInput) { ... }
fn on_forgotten(&self, _ids: &[String]) { ... }
}Expand description
Receives memory events after they are durable. Default: none. Callbacks run on the
calling thread and must not call back into the same Memory’s writers.
Provided Methods§
fn on_remembered(&self, _fact: &Remembered, _input: &RememberInput)
fn on_forgotten(&self, _ids: &[String])
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".