Ben Chuanlong Du's Blog

It is never too late to learn.

Common Type of Iterators in Rust

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

There are 3 ways:

  1. convert both iterators to concrete collections with the same type
  2. enum
  3. Box<dyn Iterator<Item=Type>>
In [ ]:
 
In [ ]:
 
In [ ]:
 
In [ ]:
 

Comments