1use kstring::KString;
6use serde::{Deserialize, Serialize};
7
8#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10pub struct Attribute {
11 pub name: KString,
12 pub description: KString,
13 pub field_name: KString,
14 pub ty: AttributeType,
15}
16
17#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
18pub enum AttributeType {
19 Bool,
20 KString,
21 Integer,
22 Float,
23 Identifier(KString),
24 Enumerable(Vec<KString>),
25}
26
27#[derive(Debug, Clone, Serialize, Deserialize)]
31pub struct MergedElement {
32 pub tag_name: KString,
33 pub struct_name: KString,
34 pub submodule_name: KString,
35 pub mdn_link: KString,
36 pub has_global_attributes: bool,
37 pub has_closing_tag: bool,
38 pub attributes: Vec<Attribute>,
39 pub dom_interface: KString,
40 pub content_categories: Vec<MergedCategory>,
41 pub permitted_child_elements: Vec<KString>,
42}
43
44#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
49pub enum MergedCategory {
50 Metadata,
51 Flow,
52 Sectioning,
53 Heading,
54 Phrasing,
55 Embedded,
56 Interactive,
57 Palpable,
58 ScriptSupporting,
59 Transparent,
60}