summaryrefslogtreecommitdiffstats
path: root/src/types.rs
blob: 82f9c6552b05170fa5a22c37543da0598c3854f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use serde_derive::{Serialize, Deserialize};

use std::collections::BTreeMap;

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Poseidoc {
    pub config: toml::Value,
    pub entities: BTreeMap<String, Entity>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Entity {
    pub name: String,
    //location: SourceLocation
    pub language: String,
    pub kind: String,
    pub brief_description: String,
    pub documentation: String,
    pub children: BTreeMap<String, BTreeMap<String, Entity>>,
}

// TODO: use newtype for language, entity kind, entity ID