#![doc = include_str!("../README.md")]
#![warn(missing_debug_implementations)]
use std::pin::Pin;
use futures_core::Future;
#[doc(no_inline)]
pub use ruma;
pub mod debug;
pub mod deserialized_responses;
pub mod executor;
pub mod failures_cache;
pub mod linked_chunk;
pub mod ring_buffer;
pub mod store_locks;
pub mod timeout;
pub mod tracing_timer;
#[cfg(all(target_arch = "wasm32", not(tarpaulin_include)))]
pub mod js_tracing;
pub use store_locks::LEASE_DURATION_MS;
#[cfg(not(target_arch = "wasm32"))]
pub trait SendOutsideWasm: Send {}
#[cfg(not(target_arch = "wasm32"))]
impl<T: Send> SendOutsideWasm for T {}
#[cfg(target_arch = "wasm32")]
pub trait SendOutsideWasm {}
#[cfg(target_arch = "wasm32")]
impl<T> SendOutsideWasm for T {}
#[cfg(not(target_arch = "wasm32"))]
pub trait SyncOutsideWasm: Sync {}
#[cfg(not(target_arch = "wasm32"))]
impl<T: Sync> SyncOutsideWasm for T {}
#[cfg(target_arch = "wasm32")]
pub trait SyncOutsideWasm {}
#[cfg(target_arch = "wasm32")]
impl<T> SyncOutsideWasm for T {}
pub trait AsyncTraitDeps: std::fmt::Debug + SendOutsideWasm + SyncOutsideWasm {}
impl<T: std::fmt::Debug + SendOutsideWasm + SyncOutsideWasm> AsyncTraitDeps for T {}
#[macro_export]
macro_rules! boxed_into_future {
() => {
$crate::boxed_into_future!(extra_bounds: );
};
(extra_bounds: $($extra_bounds:tt)*) => {
#[cfg(target_arch = "wasm32")]
type IntoFuture = ::std::pin::Pin<::std::boxed::Box<
dyn ::std::future::Future<Output = Self::Output> + $($extra_bounds)*
>>;
#[cfg(not(target_arch = "wasm32"))]
type IntoFuture = ::std::pin::Pin<::std::boxed::Box<
dyn ::std::future::Future<Output = Self::Output> + Send + $($extra_bounds)*
>>;
};
}
#[cfg(target_arch = "wasm32")]
pub type BoxFuture<'a, T> = Pin<Box<dyn Future<Output = T> + 'a>>;
#[cfg(not(target_arch = "wasm32"))]
pub type BoxFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;
#[cfg(feature = "uniffi")]
uniffi::setup_scaffolding!();