Closed inanna-malick closed 5 years ago
foo() is async so it evaluates to a future, not a String. You need to await it.
self.test_caps().foo().await
Also the value of type &Self::Output is live across the await point so you must require that it is threadsafe.
type Output: TestCap + Sync;
awesome, thanks - I had assumed you didn't need to .await
unless you wanted to use the result of an async function, such that (eg) having an async function as the last expression of an async function wouldn't require await
I'm not experienced enough with async/await to be sure that this is a library issue and not a user error, but I didn't expect to see this type of type error in this use case. (minimized example)
results in: