Hidden type caputures lifetime smaller than function body

I didn't look at your code specifically, but you can read a detailed explanation of E0700 (in the context of async, even) here. And see also the fix-hidden-lifetime-bug crate.