`Fn` is not general enough

60 · Users Rust Lang · April 27, 2026, 5:59 p.m.
Summary
The post discusses an issue faced while working with ZST keypaths in Rust, specifically concerning the `Fn` trait implementation and the need to use `get_ref` and `set_ref` functions. The author shares error messages encountered and provides code snippets that illustrate the problem. The focus is on the complexities of type lifetimes in closures and how to handle them effectively in Rust.