pub struct UnionMemberDef {
pub name: ConstructorName,
pub fields: Vec<StructField>,
}Expand description
A member (constructor) of a tagged-union type.
The compiler treats every type T { ... } declaration as an n-variant
tagged union — including single-variant cases. Each variant carries
its payload fields inline; there are no per-variant standalone types.
Fields§
§name: ConstructorNameConstructor name.
fields: Vec<StructField>Payload fields for this constructor. An empty Vec means a unit
constructor (Coast).
Trait Implementations§
Source§impl Clone for UnionMemberDef
impl Clone for UnionMemberDef
Source§fn clone(&self) -> UnionMemberDef
fn clone(&self) -> UnionMemberDef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for UnionMemberDef
impl RefUnwindSafe for UnionMemberDef
impl Send for UnionMemberDef
impl Sync for UnionMemberDef
impl Unpin for UnionMemberDef
impl UnsafeUnpin for UnionMemberDef
impl UnwindSafe for UnionMemberDef
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