pub struct CodeGraph { /* private fields */ }Expand description
One deterministic, language-tagged code topology.
Immutable after construction: fields are private, every accessor borrows,
and the value implements neither Clone nor Deserialize. A consumer that
wants a graph builds one from the facts it holds rather than hydrating one
whose records nothing validated.
Implementations§
Source§impl CodeGraph
impl CodeGraph
Sourcepub const SCHEMA_VERSION: u32 = 1
pub const SCHEMA_VERSION: u32 = 1
The version of the serialized topology contract this crate emits.
Sourcepub fn schema_version(&self) -> u32
pub fn schema_version(&self) -> u32
The version of the serialized topology contract this value carries.
Sourcepub fn tier(&self) -> ResolutionTier
pub fn tier(&self) -> ResolutionTier
Which resolution mechanism produced the facts behind this graph.
Sourcepub fn node(&self, id: GraphNodeId) -> Option<&GraphNode>
pub fn node(&self, id: GraphNodeId) -> Option<&GraphNode>
The node one identity selects.
Sourcepub fn containment(&self) -> &[ContainmentEdge]
pub fn containment(&self) -> &[ContainmentEdge]
Every containment edge, sorted by child.
Sourcepub fn references(&self) -> &[GraphReference]
pub fn references(&self) -> &[GraphReference]
Every reference record, indexed by its own dense identity.
Sourcepub fn reference(&self, id: GraphReferenceId) -> Option<&GraphReference>
pub fn reference(&self, id: GraphReferenceId) -> Option<&GraphReference>
The reference record one identity selects.
Sourcepub fn edge(&self, id: GraphEdgeId) -> Option<&GraphEdge>
pub fn edge(&self, id: GraphEdgeId) -> Option<&GraphEdge>
The edge one identity selects.
Trait Implementations§
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