pub struct Cpg {
pub node: Vec<Node>,
pub edge: Vec<Edge>,
}
Expand description
The root structure of a Code Property Graph (CPG).
A CPG consists of nodes representing program entities (methods, variables, etc.) and edges representing relationships between those entities.
§Examples
use cpg_rs::{Cpg, Node, Edge, NodeType, EdgeType};
// Create a new CPG with nodes and edges
let cpg = Cpg {
node: vec![], // Add nodes here
edge: vec![], // Add edges here
};
Fields§
§node: Vec<Node>
§edge: Vec<Edge>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Cpg
impl<'de> Deserialize<'de> for Cpg
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 StructuralPartialEq for Cpg
Auto Trait Implementations§
impl Freeze for Cpg
impl RefUnwindSafe for Cpg
impl Send for Cpg
impl Sync for Cpg
impl Unpin for Cpg
impl UnwindSafe for Cpg
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