pub(crate) struct DocType {
pub name: String,
pub doc: String,
pub shape: DocShape,
}
pub(crate) enum DocShape {
Fields(Vec<DocField>),
Values(Vec<DocValue>),
}
pub(crate) struct DocField {
pub key: String,
pub doc: String,
pub ty: DocFieldType,
pub optional: bool,
pub default: Option<String>,
}
pub(crate) struct DocValue {
pub value: String,
pub doc: String,
}
#[derive(Debug, PartialEq, Eq)]
pub(crate) enum DocFieldType {
Bool,
Float,
Integer,
Str,
Object,
Array {
elem: Box<DocFieldType>,
len: Option<usize>,
},
Name(String),
}