In the standard library and in the futures create, there are a number of adapters, like map. They are interesting in that they place bounds like
where F: FnOnce(A::Item) -> U not on the struct, but on the impl.
Why is that?
My intuition says that these bounds belong to the corresponding struct. On the other hand, I’ve heard somewhere that Haskell guys used to have bounds on
data, which were removed in favor on bounds on
So, what exactly is the difference between these two places for bounds? Which is preferable and why?