Expand description
An immutable version of ware. Does not use RefCells, instead relying on the user to return the modified variable in the closure.
Example
use ware::im::Ware;
fn main() {
let mut chain: Ware<i32> = Ware::new();
chain.wrap(Box::new(|num| num * 10));
chain.wrap(Box::new(|num| num - 2));
let result = chain.run(5);
assert_eq!(result, 48);
}
Structs
- A middleware chain.