How to express lifetime constraints for closures which take and return references?
I have sketched out an example problem in the Rust playground. For reference, I will provide the full code at the end of this question. I have attempted to write the following function. fn get_longest_time_window(&self) -> Option<u64> { let lambda = |lhs: &Element, rhs: &Element| -> &Element { return if lhs.time_window >= rhs.time_window { lhs… Read More How to express lifetime constraints for closures which take and return references?