pub struct Document {
pub version: (u32, u32),
pub aliases: BTreeMap<String, String>,
pub structs: BTreeMap<String, Vec<String>>,
pub nests: BTreeMap<String, String>,
pub root: BTreeMap<String, Item>,
}Expand description
A parsed HEDL document.
Fields§
§version: (u32, u32)Version (major, minor).
aliases: BTreeMap<String, String>Alias definitions.
structs: BTreeMap<String, Vec<String>>Struct definitions (type -> columns).
nests: BTreeMap<String, String>Nest relationships (parent -> child).
root: BTreeMap<String, Item>Root body content.
Implementations§
Source§impl Document
impl Document
Sourcepub fn get_schema(&self, type_name: &str) -> Option<&Vec<String>>
pub fn get_schema(&self, type_name: &str) -> Option<&Vec<String>>
Get a struct schema by type name.
Sourcepub fn get_child_type(&self, parent_type: &str) -> Option<&String>
pub fn get_child_type(&self, parent_type: &str) -> Option<&String>
Get the child type for a parent type (from NEST).
Sourcepub fn expand_alias(&self, key: &str) -> Option<&String>
pub fn expand_alias(&self, key: &str) -> Option<&String>
Expand an alias key to its value.
Trait Implementations§
impl StructuralPartialEq for Document
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnwindSafe for Document
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