Skip to main content

MutationRecorder

Trait MutationRecorder 

Source
pub trait MutationRecorder:
    Send
    + Sync
    + 'static {
    // Required method
    fn record(&self, event: &MutationEvent);
}
Expand description

Observer that receives every successful mutation in the order the store applied it.

The recorder sees events after the mutation has been applied to the in-memory state, so it never observes a mutation that the store rejected (invalid id, empty relationship type, …). This matches the classic write-ahead-log convention of logging committed changes only.

Implementations must be Send + Sync so a shared recorder can be driven from any thread holding the store’s mutex.

Required Methods§

Source

fn record(&self, event: &MutationEvent)

Implementors§

Source§

impl<F> MutationRecorder for ClosureRecorder<F>
where F: Fn(&MutationEvent) + Send + Sync + 'static,