The guidelines below were approved by RFC #199.
For a container with elements of type
U, iterator methods should be named:
fn iter(&self) -> T // where T implements Iterator<&U> fn iter_mut(&mut self) -> T // where T implements Iterator<&mut U> fn into_iter(self) -> T // where T implements Iterator<U>
The default iterator variant yields shared references
The guidelines below were approved by RFC #344.
The name of an iterator type should be the same as the method that produces the iterator.
itershould yield an
iter_mutshould yield an
into_itershould yield an
These type names make the most sense when prefixed with their owning module,