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