cast<R> method

Future<R> cast<R>()

Casts a Future<T> to a Future<R>.

Implementation

// Motivated by: <https://stackoverflow.com/q/72576065/>
Future<R> cast<R>() async => (await this) as R;