pub struct TypeVariant {
pub name: String,
pub fields: Vec<String>,
}Expand description
A variant in a sum type definition.
e.g. Circle(Float) → TypeVariant { name: "Circle", fields: ["Float"] }
Fields§
§name: String§fields: Vec<String>Trait Implementations§
Source§impl Clone for TypeVariant
impl Clone for TypeVariant
Source§fn clone(&self) -> TypeVariant
fn clone(&self) -> TypeVariant
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TypeVariant
impl Debug for TypeVariant
Source§impl PartialEq for TypeVariant
impl PartialEq for TypeVariant
impl StructuralPartialEq for TypeVariant
Auto Trait Implementations§
impl Freeze for TypeVariant
impl RefUnwindSafe for TypeVariant
impl Send for TypeVariant
impl Sync for TypeVariant
impl Unpin for TypeVariant
impl UnsafeUnpin for TypeVariant
impl UnwindSafe for TypeVariant
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