pub enum GitStatePrefetch {
Spawned(JoinHandle<GitState>),
Inline {
invoker: GitInvoker,
repo_root: PathBuf,
},
}Expand description
HEAD + worktree hash computed on a background thread while the real
command runs, joined only when the run is stored. On big worktrees git status costs hundreds of ms; overlapping it with the command hides that
cost entirely whenever the command outlasts it.
The snapshot starts at command start instead of after completion — for the
read-only commands Dejavu optimizes the two are identical, and for test
runs that write ignored files, start-state is the more faithful fingerprint
of what produced the output. Any thread failure degrades to Nones.
Variants§
Implementations§
Source§impl GitStatePrefetch
impl GitStatePrefetch
pub fn spawn(invoker: GitInvoker, repo_root: PathBuf) -> GitStatePrefetch
pub fn join(self) -> GitState
Auto Trait Implementations§
impl !RefUnwindSafe for GitStatePrefetch
impl !UnwindSafe for GitStatePrefetch
impl Freeze for GitStatePrefetch
impl Send for GitStatePrefetch
impl Sync for GitStatePrefetch
impl Unpin for GitStatePrefetch
impl UnsafeUnpin for GitStatePrefetch
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