Crate rusty_junctions_library_generation_proc_macro

Source
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 and TerminalPartialPattern 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 a PartialPattern or a TerminalPartialPattern we are required to pass in a closure. The function_transform are used to transform the types of the closure to accept Message 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 the function_types Macro.

  • Finally the JoinPattern derive macro which is used to derive the implementation of the JoinPattern trait from the PartialPattern or TerminalPartialPattern.

See the function level documentation for further details.

Macros§

Derive Macros§