pub struct GraphStore { /* private fields */ }Implementations§
Source§impl GraphStore
impl GraphStore
Sourcepub fn open<P: AsRef<Path>>(path: P) -> Result<Self, StoreError>
pub fn open<P: AsRef<Path>>(path: P) -> Result<Self, StoreError>
Opens or creates a graph store at the specified path.
Sourcepub fn update_file(
&self,
file_path: &str,
nodes: &[CodeNode],
) -> Result<(), StoreError>
pub fn update_file( &self, file_path: &str, nodes: &[CodeNode], ) -> Result<(), StoreError>
Updates the nodes for a specific file.
This operation is atomic: it removes old nodes associated with the file and inserts the new ones.
Sourcepub fn load_graph(&self) -> Result<ArborGraph, StoreError>
pub fn load_graph(&self) -> Result<ArborGraph, StoreError>
Loads the entire graph from the store.
This iterates over all stored nodes and reconstructs the ArborGraph using the GraphBuilder (which re-links edges).
Sourcepub fn clear(&self) -> Result<(), StoreError>
pub fn clear(&self) -> Result<(), StoreError>
Clears the stored graph.
Auto Trait Implementations§
impl Freeze for GraphStore
impl !RefUnwindSafe for GraphStore
impl Send for GraphStore
impl Sync for GraphStore
impl Unpin for GraphStore
impl !UnwindSafe for GraphStore
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