pub struct Union {
pub name: QualName,
pub variables: Vec<Name>,
pub variants: Vec<Variant>,
}Expand description
A union declaration: the type a constructor builds, and the constructors that build it.
Fields§
§name: QualNameThe union, named by the package and module that declared it.
variables: Vec<Name>The type variables the declaration was written with, in order.
variants: Vec<Variant>Its constructors, in declaration order — which is the order
Variant::index counts.
Trait Implementations§
impl StructuralPartialEq for Union
Auto Trait Implementations§
impl Freeze for Union
impl RefUnwindSafe for Union
impl Send for Union
impl Sync for Union
impl Unpin for Union
impl UnsafeUnpin for Union
impl UnwindSafe for Union
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