#![cfg_attr(feature = "hw", feature(stdsimd))]
#![cfg_attr(feature = "hw", feature(llvm_asm))]
#![allow(dead_code)]
#![allow(unused_imports)]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/vertexclique/lever/master/img/lever-square.png"
)]
pub mod index;
pub mod stats;
pub mod sync;
pub mod table;
pub mod txn;
mod alloc;
mod htm;
use std::hash::Hash;
use std::sync::Arc;
pub mod prelude {
pub use crate::sync::prelude::*;
pub use crate::table::prelude::*;
pub use crate::txn::prelude::*;
}
use crate::table::lotable::LOTable;
use crate::txn::transact::TxnManager;
use anyhow::*;
#[derive(Clone)]
pub struct Lever(Arc<TxnManager>);
pub fn lever() -> Lever {
Lever(TxnManager::manager())
}
impl Lever {
pub fn new_lotable<K, V>(&self) -> LOTable<K, V>
where
K: 'static + PartialEq + Eq + Hash + Clone + Send + Sync + Ord,
V: 'static + Clone + Send + Sync,
{
LOTable::new()
}
pub fn manager(&self) -> Arc<TxnManager> {
self.0.clone()
}
}