Type Definition gstore::store::Middleware[][src]

type Middleware<A, S> = Box<dyn Fn(&Store<A, S>, Box<dyn Fn(&Store<A, S>, A)>, A)>;

A Middleware in a gstore Store is a boxed closure.

It allows to pre or post process actions and perform:

  1. asynchronous tasks
  2. side effects
  3. dispatch more actions