File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 4343//! are elements, and once they've all been exhausted, will return `None` to
4444//! indicate that iteration is finished. Individual iterators may choose to
4545//! resume iteration, and so calling [`next`] again may or may not eventually
46- //! start returning `Some(Item)` again at some point.
46+ //! start returning `Some(Item)` again at some point (for example, see [`TryIter`]) .
4747//!
4848//! [`Iterator`]'s full definition includes a number of other methods as well,
4949//! but they are default methods, built on top of [`next`], and so you get
5656//! [`Iterator`]: trait.Iterator.html
5757//! [`next`]: trait.Iterator.html#tymethod.next
5858//! [`Option`]: ../../std/option/enum.Option.html
59+ //! [`TryIter`]: ../../std/sync/mpsc/struct.TryIter.html
5960//!
6061//! # The three forms of iteration
6162//!
Original file line number Diff line number Diff line change 6969/// ```
7070#[ stable( feature = "rust1" , since = "1.0.0" ) ]
7171pub trait ExactSizeIterator : Iterator {
72- /// Returns the exact number of times the iterator will iterate .
72+ /// Returns the exact length of the iterator.
7373 ///
74+ /// The implementation ensures that the iterator will return exactly `len()`
75+ /// more times a `Some(T)` value, before returning `None`.
7476 /// This method has a default implementation, so you usually should not
7577 /// implement it directly. However, if you can provide a more efficient
7678 /// implementation, you can do so. See the [trait-level] docs for an
You can’t perform that action at this time.
0 commit comments