pub struct DataInstanceDecl {
pub doc: Option<DocComment>,
pub family_name: Ident,
pub args: Vec<Type>,
pub constrs: Vec<ConDecl>,
pub gadt_constrs: Vec<GadtConDecl>,
pub deriving: Vec<DerivingClause>,
pub span: Span,
}Expand description
A data family instance: data instance F Int = Con1 Int | Con2
Fields§
§doc: Option<DocComment>Documentation comment.
family_name: IdentThe family name.
args: Vec<Type>Type argument patterns (e.g., [Int]).
constrs: Vec<ConDecl>H98 constructors.
gadt_constrs: Vec<GadtConDecl>GADT constructors.
deriving: Vec<DerivingClause>Deriving clauses.
span: SpanThe span.
Trait Implementations§
Source§impl Clone for DataInstanceDecl
impl Clone for DataInstanceDecl
Source§fn clone(&self) -> DataInstanceDecl
fn clone(&self) -> DataInstanceDecl
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 DataInstanceDecl
impl RefUnwindSafe for DataInstanceDecl
impl Send for DataInstanceDecl
impl Sync for DataInstanceDecl
impl Unpin for DataInstanceDecl
impl UnsafeUnpin for DataInstanceDecl
impl UnwindSafe for DataInstanceDecl
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