|
|
|
|
|
by pie_flavor
1587 days ago
|
|
They return their own type, all of which implement a common trait, because traits are not types, and there's two options for representing 'any type that implements this trait', one of which can't be returned without allocating it (dyn), and the other of which can't be used in trait methods (impl). As a (frankly minimal in my opinion) effort to make this less weird to look at, the docs now have a (nearly invisible) 'notable traits' hoverable, which tells you what types implement Iterator and that anything other than them implementing Iterator is not very important. |
|