#![doc = include_str!("../README.md")]
#![warn(missing_debug_implementations)]
use std::pin::Pin;
use ruma::{RoomVersionId, room_version_rules::RoomVersionRules};
#[cfg(test)]
matrix_sdk_test_utils::init_tracing_for_tests!();
use futures_core::Future;
#[doc(no_inline)]
pub use ruma;
pub mod cross_process_lock;
pub mod debug;
pub mod deserialized_responses;
mod edit_validation;
pub mod executor;
pub mod failures_cache;
pub mod linked_chunk;
pub mod locks;
pub mod ring_buffer;
pub mod serde_helpers;
pub mod sleep;
pub mod stream;
pub mod task_monitor;
pub mod timeout;
pub mod tracing_timer;
pub mod ttl;
#[cfg(all(target_family = "wasm", not(tarpaulin_include)))]
pub mod js_tracing;
pub use cross_process_lock::LEASE_DURATION_MS;
pub use edit_validation::*;
#[cfg(not(target_family = "wasm"))]
pub trait SendOutsideWasm: Send {}
#[cfg(not(target_family = "wasm"))]
impl<T: Send> SendOutsideWasm for T {}
#[cfg(target_family = "wasm")]
pub trait SendOutsideWasm {}
#[cfg(target_family = "wasm")]
impl<T> SendOutsideWasm for T {}
#[cfg(not(target_family = "wasm"))]
pub trait SyncOutsideWasm: Sync {}
#[cfg(not(target_family = "wasm"))]
impl<T: Sync> SyncOutsideWasm for T {}
#[cfg(target_family = "wasm")]
pub trait SyncOutsideWasm {}
#[cfg(target_family = "wasm")]
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_family = "wasm")]
type IntoFuture = ::std::pin::Pin<::std::boxed::Box<
dyn ::std::future::Future<Output = Self::Output> + $($extra_bounds)*
>>;
#[cfg(not(target_family = "wasm"))]
type IntoFuture = ::std::pin::Pin<::std::boxed::Box<
dyn ::std::future::Future<Output = Self::Output> + Send + $($extra_bounds)*
>>;
};
}
#[cfg(target_family = "wasm")]
pub type BoxFuture<'a, T> = Pin<Box<dyn Future<Output = T> + 'a>>;
#[cfg(not(target_family = "wasm"))]
pub type BoxFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;
#[cfg(feature = "uniffi")]
uniffi::setup_scaffolding!();
pub const ROOM_VERSION_FALLBACK: RoomVersionId = RoomVersionId::V11;
pub const ROOM_VERSION_RULES_FALLBACK: RoomVersionRules = RoomVersionRules::V11;