pub struct TypeImpactChecker<'a> { /* private fields */ }Expand description
Type Impact Checker using TypeFlowGraphV2.
Provides fast analysis of type change impacts without running the compiler.
§Example
ⓘ
let checker = TypeImpactChecker::new(&typeflow, &graph_checker);
// Analyze impact of changing a type
let result = checker.analyze_impact(changed_symbol_id);
if result.has_issues() {
for issue in &result.issues {
println!("Impact: {:?}", issue);
}
}Implementations§
Source§impl<'a> TypeImpactChecker<'a>
impl<'a> TypeImpactChecker<'a>
Sourcepub fn new(typeflow: &'a TypeFlowGraphV2) -> Self
pub fn new(typeflow: &'a TypeFlowGraphV2) -> Self
Create a new TypeImpactChecker.
Sourcepub fn analyze_impact(&self, symbol_id: SymbolId) -> TypeImpactResult
pub fn analyze_impact(&self, symbol_id: SymbolId) -> TypeImpactResult
Analyze the impact of changing a type.
Returns detailed information about all usages and potential issues.
Sourcepub fn affected_symbols(&self, symbol_id: SymbolId) -> Vec<SymbolId>
pub fn affected_symbols(&self, symbol_id: SymbolId) -> Vec<SymbolId>
Get all symbols that would be affected by changing the given type.
This includes:
- Types that use this type as a field
- Types that have trait bounds involving this type
- Functions with parameters/returns of this type
Auto Trait Implementations§
impl<'a> Freeze for TypeImpactChecker<'a>
impl<'a> RefUnwindSafe for TypeImpactChecker<'a>
impl<'a> Send for TypeImpactChecker<'a>
impl<'a> Sync for TypeImpactChecker<'a>
impl<'a> Unpin for TypeImpactChecker<'a>
impl<'a> UnsafeUnpin for TypeImpactChecker<'a>
impl<'a> UnwindSafe for TypeImpactChecker<'a>
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> 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