Difference in impl block with generics

You could read impl<T> as "for all types T, implement the following". So in a way, <T> written behind impl is some sort of universal quantifier.

Note that strictly speaking, the implementation is implicitly restricted to types T which are Sized. So if you want to implement something really for all types T, you would have to write impl<T: ?Sized>.

2 Likes