Post

Rust supports generic methods on traits (not on closures), so the trick in the macro is to expand to a trait + impl. Unfortunately traits with generics aren't object-safe, so dyn Trait won't work. But you can use Either (see previous screenshot)