@@ -11,38 +11,38 @@ pub enum TypeDef {
11
11
12
12
#[ derive( Debug , Serialize ) ]
13
13
pub struct StructDef {
14
- name : TypeName ,
15
- fields : Vec < FieldDef > ,
16
- has_lifetime : bool ,
14
+ pub name : TypeName ,
15
+ pub fields : Vec < FieldDef > ,
16
+ pub has_lifetime : bool ,
17
17
}
18
18
19
19
#[ derive( Debug , Serialize ) ]
20
20
pub struct EnumDef {
21
- name : TypeName ,
22
- variants : Vec < EnumVariantDef > ,
21
+ pub name : TypeName ,
22
+ pub variants : Vec < EnumVariantDef > ,
23
23
/// For `@inherits` inherited enum variants
24
- inherits : Vec < EnumInheritDef > ,
25
- has_lifetime : bool ,
24
+ pub inherits : Vec < EnumInheritDef > ,
25
+ pub has_lifetime : bool ,
26
26
}
27
27
28
28
#[ derive( Debug , Serialize ) ]
29
29
pub struct EnumVariantDef {
30
- name : TypeName ,
31
- fields : Vec < FieldDef > ,
32
- discriminant : Option < u8 > ,
30
+ pub name : TypeName ,
31
+ pub fields : Vec < FieldDef > ,
32
+ pub discriminant : Option < u8 > ,
33
33
}
34
34
35
35
#[ derive( Debug , Serialize ) ]
36
36
pub struct EnumInheritDef {
37
- super_name : String ,
38
- variants : Vec < EnumVariantDef > ,
37
+ pub super_name : String ,
38
+ pub variants : Vec < EnumVariantDef > ,
39
39
}
40
40
41
41
#[ derive( Debug , Serialize ) ]
42
42
pub struct FieldDef {
43
43
/// `None` if unnamed
44
- name : Option < String > ,
45
- r#type : TypeName ,
44
+ pub name : Option < String > ,
45
+ pub r#type : TypeName ,
46
46
}
47
47
48
48
impl From < & RType > for Option < TypeDef > {
0 commit comments