#[cfg(not(target_arch = "wasm32"))]
pub use tokio_alias::runtime::*;
#[cfg(not(target_arch = "wasm32"))]
use tokio_with_wasm::alias as tokio_alias;
#[cfg(target_arch = "wasm32")]
#[derive(Clone, Debug)]
pub struct Handle;
#[cfg(target_arch = "wasm32")]
impl Handle {
pub fn try_current() -> Result<Self, TryCurrentError> {
Ok(Self)
}
}
#[cfg(target_arch = "wasm32")]
#[derive(Debug)]
pub struct TryCurrentError;
#[cfg(target_arch = "wasm32")]
impl std::fmt::Display for TryCurrentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "no tokio runtime on wasm32")
}
}
#[cfg(target_arch = "wasm32")]
impl std::error::Error for TryCurrentError {}