pub struct Snapshot {
pub path: String,
pub text: String,
pub hash: String,
pub recorded_at: SystemTime,
pub seen_lines: Option<HashSet<u32>>,
}Expand description
One full-file version observed at a point in time. The tag the model sees is
Snapshot::hash; recovery replays edits against Snapshot::text.
Fields§
§path: StringCanonical path this version belongs to.
text: StringFull normalized (LF, no BOM) file text as observed.
hash: StringContent-derived tag for Snapshot::text (see compute_file_hash).
recorded_at: SystemTimeWall-clock time the version was recorded.
seen_lines: Option<HashSet<u32>>1-indexed file lines a producer actually displayed under this tag. A
partial read leaves this sparse; a whole-file read fills every line.
Multiple reads of the same content union into one set. None means “no
provenance recorded” — the patcher then skips the seen-line check.
Trait Implementations§
impl Eq for Snapshot
impl StructuralPartialEq for Snapshot
Auto Trait Implementations§
impl Freeze for Snapshot
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnsafeUnpin for Snapshot
impl UnwindSafe for Snapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.