Skip to main content

announce_std/
future.rs

1//! announce mocks of `future` traits. Generated from newer-type-std's copies.
2
3#[allow(unused_imports)]
4use announce::announce;
5
6/// announce mock of [`::core::future::Future`]: invoke `Future!` to receive its definition.
7///
8/// The real trait is re-exported under the same path.
9#[announce(mock = ::core::future::Future)]
10pub trait Future {
11    type Output;
12    fn poll(
13        self: ::core::pin::Pin<&mut Self>,
14        cx: &mut ::core::task::Context<'_>,
15    ) -> ::core::task::Poll<Self::Output>;
16}
17
18#[doc(no_inline)]
19pub use ::core::future::Future;
20
21#[cfg(announce_std_rust_1_64)]
22/// announce mock of [`::core::future::IntoFuture`]: invoke `IntoFuture!` to receive its definition.
23///
24/// The real trait is re-exported under the same path.
25#[announce(mock = ::core::future::IntoFuture)]
26pub trait IntoFuture {
27    type Output;
28    type IntoFuture: ::core::future::Future<Output = Self::Output>;
29    fn into_future(self) -> Self::IntoFuture;
30}
31
32#[cfg(announce_std_rust_1_64)]
33#[doc(no_inline)]
34pub use ::core::future::IntoFuture;