use std::{future::Future, pin::Pin};
pub type BoxFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;
impl<T: ?Sized + Send + Sync> FutureExt for T where T: Future {}
pub trait FutureExt: Future {
fn boxed<'a>(self) -> BoxFuture<'a, Self::Output>
where
Self: Sized + 'static + Send + Sync,
{
Box::pin(self)
}
}