pub struct ChangeTracker { /* private fields */ }Expand description
Tracks changes between builds
Implementations§
Source§impl ChangeTracker
impl ChangeTracker
Sourcepub fn compute_changes(
&mut self,
build_info: &BuildInfo,
current_files: &[PathBuf],
) -> Result<()>
pub fn compute_changes( &mut self, build_info: &BuildInfo, current_files: &[PathBuf], ) -> Result<()>
Compute changes by comparing current files with build info
Sourcepub fn compute_changes_with_base(
&mut self,
build_info: &BuildInfo,
current_files: &[PathBuf],
base_dir: &Path,
) -> Result<()>
pub fn compute_changes_with_base( &mut self, build_info: &BuildInfo, current_files: &[PathBuf], base_dir: &Path, ) -> Result<()>
Compute changes with absolute file paths
Automatically normalizes paths relative to base_dir for comparison with BuildInfo
Sourcepub const fn changed_files(&self) -> &FxHashSet<PathBuf>
pub const fn changed_files(&self) -> &FxHashSet<PathBuf>
Get files that have changed
Sourcepub const fn affected_files(&self) -> &FxHashSet<PathBuf>
pub const fn affected_files(&self) -> &FxHashSet<PathBuf>
Get all files that need to be recompiled
Sourcepub const fn deleted_files(&self) -> &FxHashSet<PathBuf>
pub const fn deleted_files(&self) -> &FxHashSet<PathBuf>
Get deleted files
Sourcepub fn has_changes(&self) -> bool
pub fn has_changes(&self) -> bool
Check if any files have changed
Sourcepub fn affected_count(&self) -> usize
pub fn affected_count(&self) -> usize
Get total number of affected files
Trait Implementations§
Source§impl Debug for ChangeTracker
impl Debug for ChangeTracker
Source§impl Default for ChangeTracker
impl Default for ChangeTracker
Source§fn default() -> ChangeTracker
fn default() -> ChangeTracker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ChangeTracker
impl RefUnwindSafe for ChangeTracker
impl Send for ChangeTracker
impl Sync for ChangeTracker
impl Unpin for ChangeTracker
impl UnsafeUnpin for ChangeTracker
impl UnwindSafe for ChangeTracker
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
Converts
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>
Converts
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