pub enum TypeDeclBody {
SumType(Vec<VariantDef>),
Alias(TypeAnnotation),
}Expand description
The body of a type declaration — either a sum type or a type alias.
Variants§
SumType(Vec<VariantDef>)
type Shape = | Circle(radius: number) | Rectangle(width: number, height: number)
Alias(TypeAnnotation)
type Meters = number
Trait Implementations§
Source§impl Clone for TypeDeclBody
impl Clone for TypeDeclBody
Source§fn clone(&self) -> TypeDeclBody
fn clone(&self) -> TypeDeclBody
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 TypeDeclBody
impl Debug for TypeDeclBody
Source§impl<'de> Deserialize<'de> for TypeDeclBody
impl<'de> Deserialize<'de> for TypeDeclBody
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TypeDeclBody
impl PartialEq for TypeDeclBody
Source§impl Serialize for TypeDeclBody
impl Serialize for TypeDeclBody
impl StructuralPartialEq for TypeDeclBody
Auto Trait Implementations§
impl Freeze for TypeDeclBody
impl RefUnwindSafe for TypeDeclBody
impl Send for TypeDeclBody
impl Sync for TypeDeclBody
impl Unpin for TypeDeclBody
impl UnwindSafe for TypeDeclBody
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