Rusty Chain

This library abstracts over functional processing units called ChainLinks and Chains. Each link in the chain is meant to be independent, immutable, idempotent, and highly testable.

Features

Usage

You will want to determine what the smallest unit of processing your project consists of so that you can begin to create ChainLinks. Defend the quality of your ChainLinks by creating rigorous unit tests. After you have created a few ChainLinks bring it all together with a Chain.

Each type of processing unit (ChainLink and Chain) accept in an optional initializer, allowing for dependency injection. Now, it is possible to share dependencies between ChainLinks of a Chain, but that is highly discouraged without unit tests around the Chain.

Examples

Mapper

This example demonstrates how a ChainLink may exist to pull records from a database and map them to a model.

Inspiration

I have always wanted highly testable code and to work in an environment where the logic of my processes was absolutely dependable.

Future work