method iter.count
Number of elements (pulls them all).
Example:
fn main() io {
print("{[1, 2, 3].iter().filter(x => x > 1).count()}")
}Output
2
pub(api) move fn count() -> usizeComplexity. O(n).
Since. 1.0.0-beta
Returns
usize
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/iter.oxl:576