pub struct HaskellNewtype {
pub name: String,
pub type_param: Option<String>,
pub constructor: String,
pub field: (String, HaskellType),
pub deriving_clauses: Vec<String>,
}Expand description
A Haskell newtype declaration.
Example: newtype Name = Name { unName :: String } deriving (Show, Eq)
Fields§
§name: StringType name
type_param: Option<String>Single type parameter (or empty string)
constructor: StringConstructor name
field: (String, HaskellType)Wrapped field name and type
deriving_clauses: Vec<String>Deriving clauses
Trait Implementations§
Source§impl Clone for HaskellNewtype
impl Clone for HaskellNewtype
Source§fn clone(&self) -> HaskellNewtype
fn clone(&self) -> HaskellNewtype
Returns a duplicate of the value. Read more
1.0.0 · 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 HaskellNewtype
impl Debug for HaskellNewtype
Source§impl Display for HaskellNewtype
impl Display for HaskellNewtype
Source§impl PartialEq for HaskellNewtype
impl PartialEq for HaskellNewtype
impl StructuralPartialEq for HaskellNewtype
Auto Trait Implementations§
impl Freeze for HaskellNewtype
impl RefUnwindSafe for HaskellNewtype
impl Send for HaskellNewtype
impl Sync for HaskellNewtype
impl Unpin for HaskellNewtype
impl UnsafeUnpin for HaskellNewtype
impl UnwindSafe for HaskellNewtype
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