Expand description
Zero-cost1 type-safe event dispatchers handling events mostly at compile time(event matching logic should
reduce to a jump table used in a loop, the implementation doesn’t use runtime maps or
virtual calls giving the compiler full information required to do optimizations). See
DispatchChain for a quick start
Sequential dispatchers erase types with
Box<dyn Future>making them non-zerocost, this will be fixed afterasync_fn_traitsstabilization, today’s Rust lacks expressive power to bind Future lifetimes correctly. For sequential scenarios reading events as a stream can produce more efficient assembly ↩
Structs§
- Dispatch
Chain Dispatcherbuilder. Obtained fromEventStream::into_dispatcher.- Dispatcher
- Builds a compile-time dispatch chain in its type parameter
D. The chain is unrolled inSelf::sequential_dispatchorSelf::dispatch. - Fallback
- Intercept
- Match