pub trait Store: Send {
// Required methods
fn load(&mut self) -> Result<Snapshot>;
fn record(&mut self, change: &Change) -> Result<()>;
// Provided method
fn checkpoint(&mut self, state: &Snapshot) -> Result<()> { ... }
}Expand description
The storage of a naming service. The service calls
record for every update before it applies it and
replies, and offers a checkpoint after each
update.
Required Methods§
Provided Methods§
Sourcefn checkpoint(&mut self, state: &Snapshot) -> Result<()>
fn checkpoint(&mut self, state: &Snapshot) -> Result<()>
Called after each update with the state that includes it, so that the store can write a checkpoint when it sees fit.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".