Enum cl_typeck::definition::Adt
source · pub enum Adt {
Enum(Vec<(Sym, Option<DefID>)>),
CLikeEnum(Vec<(Sym, u128)>),
FieldlessEnum,
Struct(Vec<(Sym, Visibility, DefID)>),
TupleStruct(Vec<(Visibility, DefID)>),
UnitStruct,
Union(Vec<(Sym, DefID)>),
}
Expand description
A user-defined Aromatic Data Type
Variants§
Enum(Vec<(Sym, Option<DefID>)>)
A union-like enum type
CLikeEnum(Vec<(Sym, u128)>)
A C-like enum
FieldlessEnum
An enum with no fields, which can never be constructed
Struct(Vec<(Sym, Visibility, DefID)>)
A structural product type with named members
TupleStruct(Vec<(Visibility, DefID)>)
A structural product type with unnamed members
UnitStruct
A structural product type of neither named nor unnamed members
Union(Vec<(Sym, DefID)>)
A choose your own undefined behavior type TODO: should unions be a language feature?
Trait Implementations§
impl Eq for Adt
impl StructuralPartialEq for Adt
Auto Trait Implementations§
impl Freeze for Adt
impl RefUnwindSafe for Adt
impl Send for Adt
impl Sync for Adt
impl Unpin for Adt
impl UnwindSafe for Adt
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more