Using async-trait with lifetimes

Hi All!

Ive been trying to achieve the following using async-trait: playground
However, it fails with the above error. Is there any way to work around this? I've been trying to get around this issue myself, but it feels as if i either dont understand enough about lifetimes and async, or the crate has a bug.
Any help would be appreciated!

Something like this should work: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=fe85b55d059cbf11ec4194a308b17f03. I added a couple $ty: 'd and 'd: 'async_trait lifetime bounds.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.