pub struct CodeGraph<'a> { /* private fields */ }Implementations§
Source§impl<'a> CodeGraph<'a>
impl<'a> CodeGraph<'a>
pub fn new(project_id: &'a str, client: &'a mut GraphClient) -> Self
pub fn sync_file( &mut self, file_path: &str, imports: &[ImportRelation], definitions: &[Symbol], calls: &[CallRelation], cleanup_orphans: bool, ) -> Result<usize>
pub fn ensure_project_indexes(&mut self) -> Result<()>
pub fn ensure_file_node( &mut self, file_path: &str, symbol_count: usize, sync_token: &str, ) -> Result<()>
pub fn add_imports( &mut self, file_path: &str, imports: &[ImportRelation], sync_token: &str, ) -> Result<usize>
pub fn add_definitions( &mut self, file_path: &str, definitions: &[Symbol], sync_token: &str, ) -> Result<usize>
pub fn add_calls( &mut self, file_path: &str, calls: &[CallRelation], sync_token: &str, ) -> Result<usize>
pub fn delete_stale_file_graph( &mut self, file_path: &str, sync_token: &str, ) -> Result<()>
pub fn delete_file_graph( &mut self, file_path: &str, current_symbol_ids: &[String], ) -> Result<()>
pub fn delete_file_node(&mut self, file_path: &str) -> Result<()>
pub fn delete_file_projection(&mut self, file_path: &str) -> Result<()>
pub fn cleanup_orphans(&mut self) -> Result<()>
pub fn cleanup_deleted_files( &mut self, indexed_file_paths: &HashSet<String>, ) -> Result<GraphOrphanCleanup>
pub fn clear_project(&mut self) -> Result<()>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for CodeGraph<'a>
impl<'a> !UnwindSafe for CodeGraph<'a>
impl<'a> Freeze for CodeGraph<'a>
impl<'a> Send for CodeGraph<'a>
impl<'a> Sync for CodeGraph<'a>
impl<'a> Unpin for CodeGraph<'a>
impl<'a> UnsafeUnpin for CodeGraph<'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> 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