pub struct ValueConstructor {
pub name: Spanned<Ident>,
pub args: Vec<Spanned<TypeAnnotation>>,
pub pre_pipe_comments: Vec<Spanned<Comment>>,
pub trailing_comment: Option<Spanned<Comment>>,
}Expand description
A value constructor in a custom type definition.
Just a → ValueConstructor { name: "Just", args: [a] }
Fields§
§name: Spanned<Ident>§args: Vec<Spanned<TypeAnnotation>>§pre_pipe_comments: Vec<Spanned<Comment>>Comments that appeared BEFORE the preceding | separator (or for the
first constructor, before =). elm-format preserves these as
“trailing on previous constructor” style: they appear on their own
line(s) at the constructor-name column, with the | for THIS
constructor coming afterward on a new line. Leave empty for the
first constructor.
trailing_comment: Option<Spanned<Comment>>Optional trailing inline comment on the same source line as the
constructor: | Ctor args -- comment. elm-format keeps the comment
on the same line after the last arg.
Trait Implementations§
Source§impl Clone for ValueConstructor
impl Clone for ValueConstructor
Source§fn clone(&self) -> ValueConstructor
fn clone(&self) -> ValueConstructor
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 ValueConstructor
impl Debug for ValueConstructor
Source§impl PartialEq for ValueConstructor
impl PartialEq for ValueConstructor
Source§fn eq(&self, other: &ValueConstructor) -> bool
fn eq(&self, other: &ValueConstructor) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ValueConstructor
impl StructuralPartialEq for ValueConstructor
Auto Trait Implementations§
impl Freeze for ValueConstructor
impl RefUnwindSafe for ValueConstructor
impl Send for ValueConstructor
impl Sync for ValueConstructor
impl Unpin for ValueConstructor
impl UnsafeUnpin for ValueConstructor
impl UnwindSafe for ValueConstructor
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