pub enum TypeDef {
Sum {
name: String,
variants: Vec<TypeVariant>,
line: usize,
},
Product {
name: String,
fields: Vec<(String, String)>,
line: usize,
},
}Expand description
A user-defined type definition.
Variants§
Sum
type Shape with variants Circle(Float), Rect(Float, Float), Point
Product
record User with fields name: String, age: Int
Trait Implementations§
impl StructuralPartialEq for TypeDef
Auto Trait Implementations§
impl Freeze for TypeDef
impl RefUnwindSafe for TypeDef
impl Send for TypeDef
impl Sync for TypeDef
impl Unpin for TypeDef
impl UnsafeUnpin for TypeDef
impl UnwindSafe for TypeDef
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