`Fn` is not general enough

· 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.
AUTHOR
Sponsored
Zulip logo Zulip
Organized team chat for people who take work seriously. Topic-based threading keeps conversations focused.
Try Zulip
Become a sponsor →