pub struct DataDecl {
pub doc: Option<DocComment>,
pub name: Ident,
pub params: Vec<TyVar>,
pub constrs: Vec<ConDecl>,
pub gadt_constrs: Vec<GadtConDecl>,
pub deriving: Vec<DerivingClause>,
pub span: Span,
}Expand description
A data type declaration.
Fields§
§doc: Option<DocComment>Documentation comment.
name: IdentThe type name.
params: Vec<TyVar>Type parameters.
constrs: Vec<ConDecl>Constructors (H98 syntax).
gadt_constrs: Vec<GadtConDecl>GADT constructors (where syntax).
deriving: Vec<DerivingClause>Deriving clauses.
span: SpanThe span.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DataDecl
impl RefUnwindSafe for DataDecl
impl Send for DataDecl
impl Sync for DataDecl
impl Unpin for DataDecl
impl UnsafeUnpin for DataDecl
impl UnwindSafe for DataDecl
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