pub struct WorkSnapshot {
pub diff: GitDiffSnapshot,
pub cwd: PathBuf,
pub read_at: Instant,
pub base: Option<BaseState>,
pub base_at: Option<Instant>,
pub base_error: Option<String>,
}Expand description
A seat’s last scan of its working tree, and when it was taken.
Held whole rather than as the row alone, because the next scan takes the previous one: that is what lets the PR lookup be reused rather than repeated, and it is the scan rate-limiting its own remote lookups.
Fields§
§diff: GitDiffSnapshot§cwd: PathBufThe directory this scan was taken of. Carried because the row is not in the scan alone: whether a missing path is a gone worktree or a directory outside a repository is a fact about the path.
read_at: Instant§base: Option<BaseState>What the checkout’s last completed base refresh measured, carried across scans that do not refresh. The row draws it, so a base that moved without the count moving is still a frame.
base_at: Option<Instant>When the base above was established: the instant a completed refresh measured it, or the instant a drawing read decided to answer its base unchecked. What tells a measurement that is news from one already superseded. A refresh that finished before the read must not overwrite the state the read found; one that finished after it is the answer a page waiting on an unchecked base is owed.
base_error: Option<String>Git’s own words for a refresh that could not run, carried with the state so a page that only hears the row still names the reason. Empty when the state was measured successfully or came from a read.
Trait Implementations§
Source§impl Clone for WorkSnapshot
impl Clone for WorkSnapshot
Source§fn clone(&self) -> WorkSnapshot
fn clone(&self) -> WorkSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for WorkSnapshot
impl RefUnwindSafe for WorkSnapshot
impl Send for WorkSnapshot
impl Sync for WorkSnapshot
impl Unpin for WorkSnapshot
impl UnsafeUnpin for WorkSnapshot
impl UnwindSafe for WorkSnapshot
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§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