Shape {
id: TypeId(0xfc49579bcb5f58db9b85439232af2ad9),
layout: Sized(Layout { size: 1, align: 1 (1 << 0) }),
vtable: VTable { .. },
marker_traits: (empty),
ty: User(
Enum(
EnumType {
repr: Repr {
base: Rust,
packed: false,
},
enum_repr: U8,
variants: [
Variant {
name: "A",
rename: None,
discriminant: Some(
0,
),
attributes: [],
data: StructType {
repr: Repr {
base: C,
packed: false,
},
kind: Unit,
fields: [],
},
doc: [],
},
Variant {
name: "B",
rename: None,
discriminant: Some(
1,
),
attributes: [],
data: StructType {
repr: Repr {
base: C,
packed: false,
},
kind: Unit,
fields: [],
},
doc: [],
},
],
is_cow: false,
},
),
),
def: Undefined,
type_identifier: "DefaultTraitEnum",
type_params: [],
const_params: [],
doc: [],
attributes: [
default(()),
],
type_tag: None,
inner: None,
}
Also, maybe the default field should not be in the
variantsfield, so we don't have to iterate all variant to know witch one it the default ?