I am trying to create a struct that will hold an iterator returned by itertools::put_back. I do not know the type name to use for the struct member.
Here is how I obtain the iterator over a String:
use itertools::put_back; // 0.8.0
fn main() {
let hello = "Hello world".to_owned();
let hello_iter = hello.chars();
let mut putback_iterator = put_back(hello_iter);
}
Here is the struct definition:
pub struct ParserEventIterator {
char_iter: itertools::PutBack</* What DO I PUT HERE??? */>,
}
What is the type for putback_iterator in this case? I've tried:
itertools::PutBack<<std::string::String as Trait>::IntoIter>