Remix.run Logo
tyushk 5 hours ago

In Rust, wouldn't implementing BitOr for Fn/FnOnce/FnMut violate the orphan rule?

wavemode 4 hours ago | parent [-]

I'm envisioning that in Rust (and Python), the operator overload would be on a class/struct. It would be the macro/decorator (the same one that adds logging) which would turn the function definition into an object that implements Fn.