pub enum VariantBody {
Unit,
Record(Vec<Field>),
Tuple(Vec<Parameter>),
Array(Type),
}Expand description
What the constructor of a variant takes.
Variants§
Unit
A bare constructor such as Quit.
Record(Vec<Field>)
A record such as Move { x: Int, y: Int }.
Tuple(Vec<Parameter>)
A tuple such as Write(String) or Image(String, hOffset: Nat), possibly empty as in Ping().
Array(Type)
An array of one element type, as in Users[User]. It is a different form from Users([User]).
Trait Implementations§
Source§impl Clone for VariantBody
impl Clone for VariantBody
Source§impl Debug for VariantBody
impl Debug for VariantBody
impl Eq for VariantBody
Source§impl PartialEq for VariantBody
impl PartialEq for VariantBody
impl StructuralPartialEq for VariantBody
Auto Trait Implementations§
impl Forget for VariantBody
impl Freeze for VariantBody
impl Move for VariantBody
impl RefUnwindSafe for VariantBody
impl Send for VariantBody
impl Sync for VariantBody
impl Unpin for VariantBody
impl UnsafeUnpin for VariantBody
impl UnwindSafe for VariantBody
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