Skip to main content

linkrs_query/planning/plan/core/
common.rs

1//! Definition of the General Plan Node Structure
2
3// Tag attribute structure
4#[derive(Debug, Clone)]
5pub struct TagProp {
6    pub tag: String,
7    pub props: Vec<String>,
8}
9
10impl TagProp {
11    pub fn new(tag: &str, props: Vec<String>) -> Self {
12        Self {
13            tag: tag.to_string(),
14            props,
15        }
16    }
17}
18
19// Edge Attribute Structure
20#[derive(Debug, Clone)]
21pub struct EdgeProp {
22    pub edge_type: String,
23    pub props: Vec<String>,
24}
25
26impl EdgeProp {
27    pub fn new(edge_type: &str, props: Vec<String>) -> Self {
28        Self {
29            edge_type: edge_type.to_string(),
30            props,
31        }
32    }
33}