Iterator has an associated type
Item (and not a parameterized type) because we only have one implementation of Item for. The associated type also means the typechecker only needs to choose from one possible implementation. A parameterized type would require the typechecker to look up amongst potentially multiple implementations.
A trait that represents a thing that can be turned into an iterator
This allows you to write functions that operate on arguments that can be turned into an iterator without requiring the user to pass the iterator in.
If using a for loop you don't need to explicitly call .iter(), however there are behavioral differences. Given a vector xs:
This example gives you an owned "x" value.
While both of these (which are equivalent because
into_iter is defined for references to slices) will borrow the x values.