Skip to main content

Checkpoint

Trait Checkpoint 

Source
pub trait Checkpoint:
    Serialize
    + for<'de> Deserialize<'de>
    + Clone {
    const DATABASE_TYPE: &'static str;

    // Required methods
    fn to_cli_string(&self) -> String;
    fn from_cli_string(s: &str) -> Result<Self>
       where Self: Sized;
}
Expand description

Trait that database-specific checkpoints must implement.

This trait defines the interface for checkpoint types, enabling storage-agnostic checkpoint file handling while preserving database-specific data structures.

Required Associated Constants§

Source

const DATABASE_TYPE: &'static str

Database type identifier (e.g., “mongodb”, “neo4j”, “postgresql”, “mysql”).

Required Methods§

Source

fn to_cli_string(&self) -> String

Convert to CLI-friendly string format.

Source

fn from_cli_string(s: &str) -> Result<Self>
where Self: Sized,

Parse from CLI string format.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Checkpoint for InterleavedSnapshotCheckpoint

Source§

const DATABASE_TYPE: &'static str = "interleaved_snapshot"