Ware
Immutable middleware chains.
Ware allows you to create middleware chains that pass through and modify a value as they go along. You can imagine a middleware chain as something like this:
let initial_value = 1;
let result = middleware_2;
assert_eq!;
Ware abstracts over this concept like such:
use Ware;
let mut middleware_chain: = new;
middleware_chain.wrap;
middleware_chain.wrap;
let result = middleware_chain.run;
assert_eq!;
Ware provides a single-argument struct (e.g. Ware<i32>) and a dual-argument
struct (e.g. Ware2<i32, String>).
Functions that get registered as middleware cannot directly modify their
variables, as they have be of the Fn trait. I would
recommend using immutable data structures that are efficient when duplicating values.
Documentation
The documentation is available at https://docs.rs/ware.
License
Ware is licensed under the Prosperity Public License (see LICENSE). You cannot use it commercially without my permission.