pub struct InvalidationResult {
pub invalidated_files: Vec<PathBuf>,
pub analysis_order: Vec<PathBuf>,
pub circular_dependencies: Vec<Vec<PathBuf>>,
}Expand description
Result of invalidation detection, including cycle information.
This structure packages all information needed to perform incremental reanalysis: which files are affected, what order to analyze them in, and whether any circular dependencies were detected.
§Examples
use thread_flow::incremental::invalidation::InvalidationDetector;
use thread_flow::incremental::DependencyGraph;
use thread_utilities::RapishSet;
use std::path::PathBuf;
let graph = DependencyGraph::new();
let detector = InvalidationDetector::new(graph);
let result = detector.compute_invalidation_set(&[PathBuf::from("main.rs")]);
if result.circular_dependencies.is_empty() {
// Safe to analyze in order
for file in &result.analysis_order {
// analyze(file);
}
} else {
// Handle cycles
eprintln!("Circular dependencies detected: {:?}", result.circular_dependencies);
}Fields§
§invalidated_files: Vec<PathBuf>All files that require reanalysis (includes changed files).
analysis_order: Vec<PathBuf>Files in topological order (dependencies before dependents). May be empty or partial if cycles are detected.
circular_dependencies: Vec<Vec<PathBuf>>Strongly connected components representing circular dependencies. Each inner Vec contains files involved in a cycle. Empty if no cycles exist.
Trait Implementations§
Source§impl Clone for InvalidationResult
impl Clone for InvalidationResult
Source§fn clone(&self) -> InvalidationResult
fn clone(&self) -> InvalidationResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for InvalidationResult
impl RefUnwindSafe for InvalidationResult
impl Send for InvalidationResult
impl Sync for InvalidationResult
impl Unpin for InvalidationResult
impl UnsafeUnpin for InvalidationResult
impl UnwindSafe for InvalidationResult
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<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