Enum bakery::NodeContent [−][src]
pub enum NodeContent {
Show 20 variants
RecInt {
bit_size: u32,
signed: bool,
},
RecFloat {
size: u32,
},
RecList,
RecMap,
RecEnum {
key_type: RecTypeId,
},
RecEnumItem {
value: BigInt,
},
RecStruct,
RecStructMember,
RecTupleMember {
tid: RecTypeId,
},
RecTypeInst {
tid: RecTypeId,
},
RecGeneric {
index: u32,
},
DatMap,
DatTuple,
DatList,
DatMapAssignment,
DatTupleMember,
RecTuple,
DatInt {
repr: String,
},
DatFloat {
repr: String,
},
DatEnum,
}
Expand description
Possible elements from recipe and data files
Values prefixed with Rec refer to recipe definition items. Values prefixed with Dat refer to content data.
Variants
RecInt
Integer type
Nodes of this type are created by the compiler, to populate standard integer types such as i32, u32, etc.
RecFloat
Fields
size: u32
Floating point type
Nodes of this type are created by the compiler, to populate standard f32 and f64 types. The stored value can be 32 or 64 for respectively f32 and f64.
RecList
Generic list type
RecMap
Generic map type
RecEnum
Fields
key_type: RecTypeId
Recipe enumeration definition
RecEnum
nodes have one RecEnumItem
child node for each possible enumeration value.
RecEnumItem
Fields
value: BigInt
An enumeration possible value
RecEnumItem can have one child, which can be a RecTuple or RecStruct
RecStruct
RecStructMember
Members of structures Name of the node is the member name in the structure Type of the structure member is first and unique child
RecTupleMember
Fields
tid: RecTypeId
Members of tuples Name of the node is None
RecTypeInst
Fields
tid: RecTypeId
Node designating another existing type in the tree Firstly stores the path string to the type, and then is resolved as the pointed type node Id. This node can have children, and each RecTypeInst children is a generic type argument to the parent node.
RecGeneric
Fields
index: u32
Generic type node which may be child of RecStruct
or native generic types such as
RecList
.
index
field corresponds to the index of the generic type in the parent type.
DatMap
DatTuple
DatList
DatMapAssignment
This node corresponds to a map or structure assignment (we can consider structures as a subset of maps from a grammar perspective). Such node have two childen, one for the name or key, and a second for the value.
DatTupleMember
RecTuple
DatInt
Fields
repr: String
DatFloat
Fields
repr: String
DatEnum
Enumeration identifier (works for boolean too) Enumeration value name stored in node name Also used for structure assignments.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for NodeContent
impl Send for NodeContent
impl Sync for NodeContent
impl Unpin for NodeContent
impl UnwindSafe for NodeContent
Blanket Implementations
Mutably borrows from an owned value. Read more