pub trait Checkpoint:
Send
+ Sync
+ Clone
+ Debug {
type Error: ErrorExt + Send + Sync;
// Required methods
fn set_protocol(&mut self, action: ProtocolAction);
fn last_version(&self) -> ManifestVersion;
fn encode(&self) -> Result<Vec<u8>, Self::Error>;
fn decode(
bs: &[u8],
reader_version: ProtocolVersion,
) -> Result<Self, Self::Error>;
}
Expand description
The checkpoint by checkpoint
Required Associated Types§
Required Methods§
sourcefn set_protocol(&mut self, action: ProtocolAction)
fn set_protocol(&mut self, action: ProtocolAction)
Set a protocol action into checkpoint
sourcefn last_version(&self) -> ManifestVersion
fn last_version(&self) -> ManifestVersion
The last compacted action’s version of checkpoint
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.