newer_type_std/future.rs
1use crate::emit_traits;
2use newer_type::target;
3
4emit_traits! {
5 #[target(alternative = ::core::future::Future)]
6 pub trait Future {
7 type Output;
8 fn poll(self: ::core::pin::Pin<&mut Self>, cx: &mut ::core::task::Context<'_>) -> ::core::task::Poll<Self::Output>;
9 }
10
11 #[target(alternative = ::core::future::IntoFuture)]
12 pub trait IntoFuture {
13 type Output;
14 type IntoFuture: ::core::future::Future<Output = Self::Output>;
15 fn into_future(self) -> Self::IntoFuture;
16 }
17}