Closed
Description
use std::future::Future;
trait Handler {}
struct W<T>(T);
trait SendTarget {
fn call(self) -> impl Future<Output = ()> + Send;
}
impl<T> SendTarget for W<T>
where
T: Handler + Send,
{
async fn call(self) {
todo!()
}
}
impl<T> SendTarget for T
where
T: Handler + Send,
{
async fn call(self) {
W(self).call().await
}
}
fn main() {}
Metadata
Metadata
Assignees
Type
Projects
Status
done