pub struct CustomType {
pub documentation: Option<Spanned<String>>,
pub name: Spanned<Ident>,
pub generics: Vec<Spanned<Ident>>,
pub pre_equals_comments: Vec<Spanned<Comment>>,
pub constructors: Vec<Spanned<ValueConstructor>>,
}Expand description
A custom type (ADT / tagged union) definition.
Fields§
§documentation: Option<Spanned<String>>Optional documentation comment.
name: Spanned<Ident>The type name: Msg
generics: Vec<Spanned<Ident>>Type parameters: a in type Maybe a = ...
pre_equals_comments: Vec<Spanned<Comment>>Comments that appear between the type name/generics and the =.
elm-format preserves these by wrapping the type header over two
lines:
type
Sequence value
– repeat, delay, duration
= Sequence …
constructors: Vec<Spanned<ValueConstructor>>The constructors: Just a | Nothing
Trait Implementations§
Source§impl Clone for CustomType
impl Clone for CustomType
Source§fn clone(&self) -> CustomType
fn clone(&self) -> CustomType
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 moreSource§impl Debug for CustomType
impl Debug for CustomType
Source§impl PartialEq for CustomType
impl PartialEq for CustomType
Source§fn eq(&self, other: &CustomType) -> bool
fn eq(&self, other: &CustomType) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CustomType
impl StructuralPartialEq for CustomType
Auto Trait Implementations§
impl Freeze for CustomType
impl RefUnwindSafe for CustomType
impl Send for CustomType
impl Sync for CustomType
impl Unpin for CustomType
impl UnsafeUnpin for CustomType
impl UnwindSafe for CustomType
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