pub struct DependencyGraph { /* private fields */ }Expand description
File dependency graph: tracks which files depend on which other files. Used for incremental invalidation in LSP servers and build systems.
Implementations§
Source§impl DependencyGraph
impl DependencyGraph
Sourcepub fn file_count(&self) -> usize
pub fn file_count(&self) -> usize
Number of files tracked by this graph.
Sourcepub fn dependency_edge_count(&self) -> usize
pub fn dependency_edge_count(&self) -> usize
Number of direct dependency edges.
Sourcepub fn dependent_edge_count(&self) -> usize
pub fn dependent_edge_count(&self) -> usize
Number of reverse dependency edges.
Sourcepub fn dependency_paths_of(&self, file: &str) -> Vec<Arc<str>>
pub fn dependency_paths_of(&self, file: &str) -> Vec<Arc<str>>
Files that file directly depends on, as interned paths.
Sourcepub fn dependent_paths_of(&self, file: &str) -> Vec<Arc<str>>
pub fn dependent_paths_of(&self, file: &str) -> Vec<Arc<str>>
Files that directly depend on file, as interned paths.
Sourcepub fn dependencies_of(&self, file: &str) -> &[String]
pub fn dependencies_of(&self, file: &str) -> &[String]
Files that file directly depends on (imports, parent classes, interfaces, traits).
Sourcepub fn dependents_of(&self, file: &str) -> &[String]
pub fn dependents_of(&self, file: &str) -> &[String]
Files that directly depend on file (reverse edge).
Sourcepub fn transitive_dependencies(&self, file: &str) -> Vec<String>
pub fn transitive_dependencies(&self, file: &str) -> Vec<String>
All files transitively depended upon by file (including indirect).
Sourcepub fn transitive_dependents(&self, file: &str) -> Vec<String>
pub fn transitive_dependents(&self, file: &str) -> Vec<String>
All files that transitively depend on file (reverse transitive).
Trait Implementations§
Source§impl Clone for DependencyGraph
impl Clone for DependencyGraph
Auto Trait Implementations§
impl !Freeze for DependencyGraph
impl RefUnwindSafe for DependencyGraph
impl Send for DependencyGraph
impl Sync for DependencyGraph
impl Unpin for DependencyGraph
impl UnsafeUnpin for DependencyGraph
impl UnwindSafe for DependencyGraph
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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