pub struct OnDiskSource { /* private fields */ }Expand description
D.3.a (2026-05-29): on-disk file participant source.
snapshot re-reads the file at path and parses it into a
fresh Rope. Used by :diff (no args) — “diff against
the on-disk version of this file.” Cheap enough to do
inside spawn_blocking per the DiffParticipantSource
contract; D.3’s first consumer is single-file inline
overlay so per-recompute file re-reads are acceptable.
Future D.7 (:Gdiff) introduces a separate GitSource
that reads through gix against a fixed ref.
On I/O error (missing path, permissions, mid-read crash)
snapshot returns an empty rope. The session then recomputes
the diff against empty baseline (all-Add hunks), which is
the “everything is new” presentation — a noisy but
defensible degradation that the user can resolve via
:diffoff and a corrected path. We log the error at
tracing::debug so the failure surfaces under
RUST_LOG=lattice_host::diff::subsystem=debug without
blocking the recompute path.
Implementations§
Trait Implementations§
Source§impl Clone for OnDiskSource
impl Clone for OnDiskSource
Source§fn clone(&self) -> OnDiskSource
fn clone(&self) -> OnDiskSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OnDiskSource
impl Debug for OnDiskSource
Source§impl DiffParticipantSource for OnDiskSource
impl DiffParticipantSource for OnDiskSource
Auto Trait Implementations§
impl Freeze for OnDiskSource
impl RefUnwindSafe for OnDiskSource
impl Send for OnDiskSource
impl Sync for OnDiskSource
impl Unpin for OnDiskSource
impl UnsafeUnpin for OnDiskSource
impl UnwindSafe for OnDiskSource
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more