pub enum TypeDefKind {
Required,
Union {
members: Vec<UnionMemberDef>,
},
}Expand description
The kind of a type definition.
The functional core only distinguishes two shapes: a required type
stub (no body, awaits binding via include) and an n-variant union
— single-variant or multi-variant alike. Record-shaped types are
represented as a single-variant union whose sole constructor’s name
matches the type’s name (e.g.,
type Position { Position(x: Length, y: Length) }).
Variants§
Required
A required type with no body: type Element;. Bound from outside
via parameterized include.
Union
A tagged union: type Maneuver { Impulsive(delta_v: Velocity), Coast }
or, as a single-variant special case,
type Position { Position(x: Length, y: Length) }.
Fields
§
members: Vec<UnionMemberDef>Trait Implementations§
Source§impl Clone for TypeDefKind
impl Clone for TypeDefKind
Source§fn clone(&self) -> TypeDefKind
fn clone(&self) -> TypeDefKind
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 TypeDefKind
impl RefUnwindSafe for TypeDefKind
impl Send for TypeDefKind
impl Sync for TypeDefKind
impl Unpin for TypeDefKind
impl UnsafeUnpin for TypeDefKind
impl UnwindSafe for TypeDefKind
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