pub struct CodeGraph {
pub symbols: Vec<Symbol>,
pub references: Vec<Reference>,
}Expand description
A code graph: the symbols defined and references found in a single file’s
slice. Path-agnostic; a whole view is assembled from many of these keyed by
path in a GraphStore.
Fields§
§symbols: Vec<Symbol>§references: Vec<Reference>Implementations§
Source§impl CodeGraph
impl CodeGraph
Sourcepub fn to_slice_bytes(&self) -> Vec<u8> ⓘ
pub fn to_slice_bytes(&self) -> Vec<u8> ⓘ
Serialize this slice to its content-addressed blob bytes (ADR 0012). Byte-stable for equal content, since the model carries no path.
Sourcepub fn from_slice_bytes(bytes: &[u8]) -> Result<Self, Error>
pub fn from_slice_bytes(bytes: &[u8]) -> Result<Self, Error>
Deserialize a slice from its blob bytes.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CodeGraph
impl<'de> Deserialize<'de> for CodeGraph
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CodeGraph
impl StructuralPartialEq for CodeGraph
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