pub struct Variant {
pub name: String,
pub fields: Vec<TypeExpr>,
pub span: Span,
}Expand description
one variant of an enum: a name and zero or more field types. North has no
fields, Circle(f64) one, Rect(f64, f64) two.
Fields§
§name: Stringthe variant name.
fields: Vec<TypeExpr>the data the variant carries, as a list of field types (possibly empty).
span: Spanthe variant’s source span (name, plus its ( ... ) if any).
Trait Implementations§
impl StructuralPartialEq for Variant
Auto Trait Implementations§
impl Freeze for Variant
impl RefUnwindSafe for Variant
impl Send for Variant
impl Sync for Variant
impl Unpin for Variant
impl UnsafeUnpin for Variant
impl UnwindSafe for Variant
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