#[cfg(feature = "async-std")]
#[cfg_attr(docsrs, doc(cfg(feature = "async-std")))]
pub mod runtime_async_std;
#[cfg(feature = "tokio")]
#[cfg_attr(docsrs, doc(cfg(feature = "tokio")))]
pub mod runtime_tokio;
#[cfg(feature = "wasm32")]
#[cfg_attr(docsrs, doc(cfg(feature = "wasm32")))]
pub mod runtime_wasm32;
#[cfg(feature = "wasm32")]
#[cfg_attr(docsrs, doc(cfg(feature = "wasm32")))]
pub mod wasm_timeout;
use core::future::Future as CoreFuture;
pub trait Spawning<T, H, U> {
fn spawn<F>(fut: F) -> H
where
F: CoreFuture<Output = T> + Send + 'static,
T: Send + 'static,
H: SpawnJoinHandle<U>;
fn spawn_blocking<F>(fut: F) -> H
where
F: FnOnce() -> T + Send + 'static,
T: Send + 'static,
H: SpawnJoinHandle<U>;
fn block_on<F>(fut: F) -> T
where
F: CoreFuture<Output = T>;
fn spawn_local<F>(fut: F) -> H
where
F: CoreFuture<Output = T> + 'static,
T: 'static,
H: SpawnJoinHandle<U>;
}
pub trait SpawnJoinHandle<U>: Send + Sync + Unpin + CoreFuture<Output = U> {}