pub trait StateCoordinator {
// Required methods
fn process_event(&self, event: &StateEvent) -> StateChange;
fn apply_change(&mut self, change: StateChange);
fn emit_event(&self, event: StateEvent);
}
Expand description
Trait for coordinating state changes
Required Methods§
Sourcefn process_event(&self, event: &StateEvent) -> StateChange
fn process_event(&self, event: &StateEvent) -> StateChange
Process a state event and return changes to apply
Sourcefn apply_change(&mut self, change: StateChange)
fn apply_change(&mut self, change: StateChange)
Apply a state change to the buffer
Sourcefn emit_event(&self, event: StateEvent)
fn emit_event(&self, event: StateEvent)
Emit an event (for notification)