Enum rustc::middle::trans::adt::Repr[src]
pub enum Repr {
CEnum(IntType, Disr, Disr),
Univariant(Struct, bool),
General(IntType, Vec<Struct>),
RawNullablePointer {
pub nndiscr: Disr,
pub nnty: t,
pub nullfields: Vec<t>,
},
StructWrappedNullablePointer {
pub nonnull: Struct,
pub nndiscr: Disr,
pub ptrfield: uint,
pub nullfields: Vec<t>,
},
}Representations.
Variants
CEnum | C-like enums; basically an int. | ||||||||
Univariant | Single-case variants, and structs/tuples/records. Structs with destructors need a dynamic destroyedness flag to
avoid running the destructor too many times; this is included
in the | ||||||||
General | General-case enums: for each case there is a struct, and they all start with a field for the discriminant. | ||||||||
RawNullablePointer | Two cases distinguished by a nullable pointer: the case with discriminant
Fields
| ||||||||
StructWrappedNullablePointer | Two cases distinguished by a nullable pointer: the case with discriminant
For example, Fields
|