1 unstable release
0.1.0 | Mar 24, 2022 |
---|
#4 in #join-calculus
Used in rusty-junctions-macro
32KB
674 lines
Crate providing the essential functionality for the compile time
generation of the
rusty_junctions
crate to an arbitrary pattern arity.
The intention of this crate is to be called from within the root of
the
rusty_junctions
crate library in order to generate all of the essential components:
-
The
PartialPattern
andTerminalPartialPattern
patterns
that leverage the compiler to provide the type safety guarantees provided to the clients at compile time, preventing a number of difficult to debug runtime issues. -
When applying the
then_do
method to aPartialPattern
or aTerminalPartialPattern
we are required to pass in a closure. Thefunction_transform
are used to transform the types of the closure to acceptMessage
as the arguments. -
The type of the transformed closures also depend on the arity of the associated
pattern
, so we are required to generate this programmatically. This is done internally using thefunction_types
Macro. -
Finally the
JoinPattern
derive macro which is used to derive the implementation of theJoinPattern
trait from thePartialPattern
orTerminalPartialPattern
.
See the function level documentation for further details.
Dependencies
~1.5MB
~37K SLoC