Implement IntoIterator for binary tree
I am trying to build a binary tree and write an iterator to traverse values in the tree. When implementing the IntoIterator trait for my tree nodes I ran into a problem with lifetimes src\main.rs:43:6: 43:8 error: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates [E0207] src\main.rs:43 impl<'a, T: 'a> IntoIterator for Node<T> { I understand that I need to specify that NodeIterator will live as long as Node but I am unsure of how to express that use std::cmp::PartialOrd; use std::boxed::Box; struct Node<T: PartialOrd> { value: T, left: Option<Box<Node<T>