Expand description
This crate defines the types necessary to translate Rust data types to Purescript. Most users
will only need to derive AsPursType
with the purescript_waterslide_derive
crate and use
the purs_module!
macro to generate modules.
Macros§
- purs_
module - Use this macro to generate purescript modules. It takes a module name (a String) and a comma-separated list of types you want to include in the module.
Structs§
- Purs
Constructor - Represents a Purescript type name with its parameters and which module it comes from.
- Purs
Module - Represents a Purescript module with a name, imports and multiple data types declarations. It is
most easily generated with the
purs_module!
macro. You can then use theDisplay
implementations.
Enums§
- Purs
Type - The representation for a Purescript data type declaration. The
PursType
for a Rust struct and enum can be obtained by deriving theAsPursType
trait.
Traits§
- AsPurs
Constructor - Produce a
PursConstructor
from a Rust type. - AsPurs
Type - Struct and enums that implement that trait can be part of generated modules.
AsPursType
is required to produce a data type definition, whereasAsPursConstructor
and its corresponding structPursConstructor
are necessary to use a type in definitions.