I have a custom iterator on a struct. Now if the struct is a references, the iterator gives me this error:
no method named `iter` found for type `&result::Table in the current scope`
It worked by implementing
IntoIterator for the reference to the struct. However, then I need to call
into_iter() to use it.
How can I implement a custom iterator (with
.iter() method) for references to structs?