Rust · Method
Iterator::collect
Iterator::collect consumes an iterator and builds a value such as Vec, VecDeque, or a custom type implementing FromIterator. The result type must be inferable or stated explicitly.
Last updated
- Since
- 1.0.0
Syntax
fn collect<B>(self) -> B where Self: Iterator, B: FromIterator<Self::Item>;In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
FromIteratorIntoIteratorVecVecDeque