File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 43
43
//! are elements, and once they've all been exhausted, will return `None` to
44
44
//! indicate that iteration is finished. Individual iterators may choose to
45
45
//! 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`]) .
47
47
//!
48
48
//! [`Iterator`]'s full definition includes a number of other methods as well,
49
49
//! but they are default methods, built on top of [`next`], and so you get
56
56
//! [`Iterator`]: trait.Iterator.html
57
57
//! [`next`]: trait.Iterator.html#tymethod.next
58
58
//! [`Option`]: ../../std/option/enum.Option.html
59
+ //! [`TryIter`]: ../../std/sync/mpsc/struct.TryIter.html
59
60
//!
60
61
//! # The three forms of iteration
61
62
//!
Original file line number Diff line number Diff line change 69
69
/// ```
70
70
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
71
71
pub trait ExactSizeIterator : Iterator {
72
- /// Returns the exact number of times the iterator will iterate .
72
+ /// Returns the exact length of the iterator.
73
73
///
74
+ /// The implementation ensures that the iterator will return exactly `len()`
75
+ /// more times a `Some(T)` value, before returning `None`.
74
76
/// This method has a default implementation, so you usually should not
75
77
/// implement it directly. However, if you can provide a more efficient
76
78
/// implementation, you can do so. See the [trait-level] docs for an
You can’t perform that action at this time.
0 commit comments