Re:Rust’s async isn’t colored
by pornel on Thursday March 11, 2021 @10:38AM
(#26425133)
No, you can abstract over "color".
You can implement a trait that lets you call both sync and async functions in the same way. You can with the same code and same syntax, get results of either `Fn()->T` or `Fn()->Future<Output=T>`.
You can implement a trait that lets you call both sync and async functions in the same way. You can with the same code and same syntax, get results of either `Fn()->T` or `Fn()->Future<Output=T>`.