pub struct CodeGraph { /* private fields */ }Implementations§
Source§impl CodeGraph
impl CodeGraph
pub fn open(project_root: &Path) -> Result<Self>
pub fn open_in_memory() -> Result<Self>
pub fn db_path(&self) -> &Path
pub fn connection(&self) -> &Connection
pub fn upsert_node(&self, node: &Node) -> Result<i64>
pub fn upsert_edge(&self, edge: &Edge) -> Result<()>
pub fn get_node_by_path(&self, file_path: &str) -> Result<Option<Node>>
pub fn get_node_by_symbol( &self, name: &str, file_path: &str, ) -> Result<Option<Node>>
pub fn remove_file_nodes(&self, file_path: &str) -> Result<()>
pub fn edges_from(&self, node_id: i64) -> Result<Vec<Edge>>
pub fn edges_to(&self, node_id: i64) -> Result<Vec<Edge>>
pub fn dependents(&self, file_path: &str) -> Result<Vec<String>>
pub fn dependencies(&self, file_path: &str) -> Result<Vec<String>>
pub fn impact_analysis( &self, file_path: &str, max_depth: usize, ) -> Result<ImpactResult>
pub fn dependency_chain( &self, from: &str, to: &str, ) -> Result<Option<DependencyChain>>
pub fn node_count(&self) -> Result<usize>
pub fn edge_count(&self) -> Result<usize>
pub fn clear(&self) -> Result<()>
Auto Trait Implementations§
impl !Freeze for CodeGraph
impl !RefUnwindSafe for CodeGraph
impl Send for CodeGraph
impl !Sync for CodeGraph
impl Unpin for CodeGraph
impl UnsafeUnpin for CodeGraph
impl !UnwindSafe for CodeGraph
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