pub trait Handler<A, Marker> {
// Required method
fn call(self, payload: A);
}Expand description
A callback prop that may or may not take the event payload.
Marker is (Arity0 | Arity1, ReturnType). It exists only to keep the
zero-arg and one-arg impls from overlapping and to let the handler body
evaluate to something other than (); it is inferred from the closure at
every call site, so the macro can always emit a bare
Handler::call(closure, payload).