3 #### Method names [RFC #199]
5 > The guidelines below were approved by [RFC #199](https://github.com/rust-lang/rfcs/pull/199).
7 For a container with elements of type `U`, iterator methods should be named:
10 fn iter(&self) -> T // where T implements Iterator<&U>
11 fn iter_mut(&mut self) -> T // where T implements Iterator<&mut U>
12 fn into_iter(self) -> T // where T implements Iterator<U>
15 The default iterator variant yields shared references `&U`.
17 #### Type names [RFC #344]
19 > The guidelines below were approved by [RFC #344](https://github.com/rust-lang/rfcs/pull/344).
21 The name of an iterator type should be the same as the method that
22 produces the iterator.
26 * `iter` should yield an `Iter`
27 * `iter_mut` should yield an `IterMut`
28 * `into_iter` should yield an `IntoIter`
29 * `keys` should yield `Keys`
31 These type names make the most sense when prefixed with their owning module,