pub struct NewtypeDecl {
pub doc: Option<DocComment>,
pub name: Ident,
pub params: Vec<TyVar>,
pub constr: ConDecl,
pub deriving: Vec<DerivingClause>,
pub span: Span,
}Expand description
A newtype declaration.
Fields§
§doc: Option<DocComment>Documentation comment.
name: IdentThe type name.
params: Vec<TyVar>Type parameters.
constr: ConDeclThe constructor.
deriving: Vec<DerivingClause>Deriving clauses.
span: SpanThe span.
Trait Implementations§
Source§impl Clone for NewtypeDecl
impl Clone for NewtypeDecl
Source§fn clone(&self) -> NewtypeDecl
fn clone(&self) -> NewtypeDecl
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 NewtypeDecl
impl RefUnwindSafe for NewtypeDecl
impl Send for NewtypeDecl
impl Sync for NewtypeDecl
impl Unpin for NewtypeDecl
impl UnsafeUnpin for NewtypeDecl
impl UnwindSafe for NewtypeDecl
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