pub struct CoveringSetComputer { /* private fields */ }Expand description
Computes covering sets for targeted code selection
Implementations§
Source§impl CoveringSetComputer
impl CoveringSetComputer
Sourcepub fn compute_covering_set(
&mut self,
query: &EntityQuery,
file_contents: &HashMap<String, String>,
graph: &DependencyGraph,
options: &CoveringSetOptions,
) -> Result<CoveringSetResult>
pub fn compute_covering_set( &mut self, query: &EntityQuery, file_contents: &HashMap<String, String>, graph: &DependencyGraph, options: &CoveringSetOptions, ) -> Result<CoveringSetResult>
Compute a covering set for a target entity
§Arguments
query- Query to locate the target entityfile_contents- Map of file paths to their contentsgraph- Dependency graph for the projectoptions- Options controlling the computation
§Returns
A covering set result containing the target and all related files
Sourcepub fn compute_covering_set_for_files(
&self,
changed_files: &[String],
graph: &DependencyGraph,
line_map: Option<&HashMap<String, Vec<LineRange>>>,
options: &CoveringSetOptions,
) -> Result<CoveringSetResult>
pub fn compute_covering_set_for_files( &self, changed_files: &[String], graph: &DependencyGraph, line_map: Option<&HashMap<String, Vec<LineRange>>>, options: &CoveringSetOptions, ) -> Result<CoveringSetResult>
Compute a covering set starting from a set of changed files (git diff)
This variant is useful for code review or impact analysis scenarios where you want the minimal set of files that explain or are affected by a diff without needing to name a specific entity.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CoveringSetComputer
impl RefUnwindSafe for CoveringSetComputer
impl Send for CoveringSetComputer
impl Sync for CoveringSetComputer
impl Unpin for CoveringSetComputer
impl UnwindSafe for CoveringSetComputer
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