Programming, Cloudflare, Rust, Serverless, Workers.
opt-in for a dynamic dispatch instead: fn just_call(me: &dyn Fn(), maybe: bool) { if maybe { me() } } Dynamically dispatched objects don’t have a statically known size, because it depends on the implementation details of particular type being passed. They need to be passed as a reference or stored