Hey #rustlang twitter. Is there a sane way to create a function that returns a future? (specifically, a complex AndThen) It seems that the only way to do this is through a super massive return type.
-
-
Replying to @d0nutptr
You may be able to use the "impl trait" feature where you use the impl keyword in the return type
1 reply 0 retweets 0 likes -
Replying to @jntrnr
I'll try to look at the code later today but I remember it saying something about a borrowed value needed a static lifetime
1 reply 0 retweets 0 likes
Sounds like exactly what async/await helps with
6:48 AM - 3 Jul 2018
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.