pub enum CheckpointMode {
Passive,
Full,
Restart,
Truncate,
}Variants§
Passive
Checkpoint as many frames as possible without waiting for any database readers or writers to finish, then sync the database file if all frames in the log were checkpointed.
Full
This mode blocks until there is no database writer and all readers are reading from the most recent database snapshot. It then checkpoints all frames in the log file and syncs the database file. This mode blocks new database writers while it is pending, but new database readers are allowed to continue unimpeded.
Restart
This mode works the same way as Full with the addition that after checkpointing the log file it blocks (calls the busy-handler callback) until all readers are reading from the database file only. This ensures that the next writer will restart the log file from the beginning. Like Full, this mode blocks new database writer attempts while it is pending, but does not impede readers.
Truncate
This mode works the same way as Restart with the addition that it also truncates the log file to zero bytes just prior to a successful return.
Trait Implementations§
Source§impl Clone for CheckpointMode
impl Clone for CheckpointMode
Source§fn clone(&self) -> CheckpointMode
fn clone(&self) -> CheckpointMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more