Expand description
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.
Macros§
- Generate the
rusty_junctions
crate to an arbitrary pattern arity.
Derive Macros§
- Derive the implementation of the
JoinPattern
trait from thePartialPattern
orTerminalPartialPattern
. - Derive the implementation of the a Partial
pattern
from a givenstruct
. - Derive the implementation of the a Terminal
pattern
from a givenstruct
.