async_skipdb/
lib.rs

1//! Blazing fast ACID and MVCC in memory database.
2//!
3//! `async-skipdb` uses the same SSI (Serializable Snapshot Isolation) transaction model used in [`badger`](https://github.com/dgraph-io/badger).
4#![cfg_attr(docsrs, feature(doc_cfg))]
5#![cfg_attr(docsrs, allow(unused_attributes))]
6#![deny(missing_docs)]
7#![forbid(unsafe_code)]
8#![allow(clippy::type_complexity)]
9
10use std::{borrow::Borrow, hash::BuildHasher, ops::RangeBounds, sync::Arc};
11
12use async_txn::{error::TransactionError, AsyncRtm, AsyncTm, AsyncWtm, HashCm, HashCmOptions};
13
14/// `OptimisticDb` implementation, which requires `K` implements both [`Hash`](core::hash::Hash) and [`Ord`].
15/// If your `K` does not implement [`Hash`](core::hash::Hash), you can use [`SerializableDb`] instead.
16pub mod optimistic;
17
18/// `SerializableDb` implementation, which requires `K` implements [`Ord`] and [`CheapClone`](cheap_clone::CheapClone). If your `K` implements both [`Hash`](core::hash::Hash) and [`Ord`], you are recommended to use [`OptimisticDb`](crate::optimistic::OptimisticDb) instead.
19pub mod serializable;
20
21pub use skipdb_core::{
22  iter::*,
23  range::*,
24  rev_iter::*,
25  types::{Ref, ValueRef},
26};
27
28use skipdb_core::{AsSkipCore, Database, SkipCore};
29
30mod read;
31pub use read::*;
32
33pub use async_txn::{AsyncSpawner, BTreePwm, Detach};
34
35#[cfg(feature = "smol")]
36#[cfg_attr(docsrs, doc(cfg(feature = "smol")))]
37pub use async_txn::SmolSpawner;
38
39#[cfg(feature = "tokio")]
40#[cfg_attr(docsrs, doc(cfg(feature = "tokio")))]
41pub use async_txn::TokioSpawner;
42
43#[cfg(feature = "async-std")]
44#[cfg_attr(docsrs, doc(cfg(feature = "async-std")))]
45pub use async_txn::AsyncStdSpawner;
46
47#[cfg(feature = "wasm")]
48#[cfg_attr(docsrs, doc(cfg(feature = "wasm")))]
49pub use async_txn::WasmSpawner;