1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
use super::edges::EdgeKey;
use serde_json::Value as JsonValue;
use uuid::Uuid;
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
pub struct VertexMetadata {
pub id: Uuid,
pub value: JsonValue,
}
impl VertexMetadata {
pub fn new(id: Uuid, value: JsonValue) -> Self {
Self {
id: id,
value: value,
}
}
}
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
pub struct EdgeMetadata {
pub key: EdgeKey,
pub value: JsonValue,
}
impl EdgeMetadata {
pub fn new(key: EdgeKey, value: JsonValue) -> Self {
Self {
key: key,
value: value,
}
}
}