pub trait DispatchEffect<U = ()> {
// Required method
fn dispatch(
&mut self,
tag: u64,
request: &Value,
cx: &EffectContext<'_, U>,
) -> Result<Value, EffectError>;
}Expand description
Tag-based effect dispatch over an HList of handlers.
The JIT yields (tag, request) pairs where tag identifies which effect
in the Eff '[E0, E1, ...] list fired. DispatchEffect peels one layer
per HCons: tag 0 → head handler, tag N → tail with tag N−1.
You don’t implement this manually — it’s derived for frunk::HList![H0, H1, ...]
when each Hi: EffectHandler.