use std::future::Future;
trait FutureFunctions {
type Output;
fn race() {
}
}
impl<F> FutureFunctions for dyn Future<Output = F> {
type Output = F;
fn race() {
println!("Hi");
}
}
fn main() {
<dyn Future::<Output = ()>>::race();
// doesn't compile:
// Future::<Output = ()>::race();
}
I just want to remove <dyn ...>
. Then I'll be able to do this with my framework:
use rialight::prelude::*;
let _ = Future::race(iterable).await;
It'll use the futures
crate behind