pub struct CheckpointRecord {
pub id: String,
pub branch: String,
pub created_at: DateTime<Utc>,
pub message: Option<String>,
pub reason: CheckpointReason,
pub undo_completed: Option<bool>,
pub source: SourceState,
pub tracker_states: Vec<TrackerState>,
pub resource_states: Vec<ResourceState>,
}Expand description
One coherent snapshot across source, trackers, and resources — the record
newgit undo restores. Stored per instance at
.newgit/checkpoints/<slug>/ckpt_NNN.toml.
Fields§
§id: String§branch: String§created_at: DateTime<Utc>§message: Option<String>§reason: CheckpointReason§undo_completed: Option<bool>Set on a before-undo checkpoint once the undo it preceded finished.
false means that undo left at least one resource unrestored, so this
snapshot is of a state the instance never cleanly left — it is not a
redo point, and a later prune can treat it as droppable where an
explicit checkpoint never could be.
Recorded rather than acted on: newgit cannot know at save time whether the undo will succeed, and deleting the only record of a state is the one thing checkpoints exist to prevent.
source: SourceState§tracker_states: Vec<TrackerState>§resource_states: Vec<ResourceState>Trait Implementations§
Source§impl Clone for CheckpointRecord
impl Clone for CheckpointRecord
Source§fn clone(&self) -> CheckpointRecord
fn clone(&self) -> CheckpointRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CheckpointRecord
impl Debug for CheckpointRecord
Source§impl<'de> Deserialize<'de> for CheckpointRecord
impl<'de> Deserialize<'de> for CheckpointRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CheckpointRecord
Source§impl PartialEq for CheckpointRecord
impl PartialEq for CheckpointRecord
Source§impl Serialize for CheckpointRecord
impl Serialize for CheckpointRecord
impl StructuralPartialEq for CheckpointRecord
Auto Trait Implementations§
impl Freeze for CheckpointRecord
impl RefUnwindSafe for CheckpointRecord
impl Send for CheckpointRecord
impl Sync for CheckpointRecord
impl Unpin for CheckpointRecord
impl UnsafeUnpin for CheckpointRecord
impl UnwindSafe for CheckpointRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more