mmtkvdb
is a crate for Rust which provides a memory-mapped key-value
database. It uses LMDB and links with an existing liblmdb
on the system.
Because of how memory-mapped I/O is being used and also because of certain
assumptions of the underlying LMDB API, opening environments and databases
requires unsafe
Rust (i.e. the programmer must ensure that certain
preconditions are met that cannot be enforced by the compiler to avoid
undefined behavior). If you aim to program in safe Rust only, this Rust
library is not suitable for you.
For documentation on how to use this crate, refer to the example in
src/lib.rs
.
See contained LICENSE
file (MIT License).
Txn
trait, which allow moving cursors
without retrieving dataStorable
for ()
(use NoKey
and/or NoValue
instead of ()
)NoKey
and NoValue
unit structs to replace ()
as type for
databases which have no key or no value, respectively (this deprecates
the implementation of Storable
for ()
)TxnRw::on_commit
allows registering a closure that will be
executed on Txn::commit
before the transaction is actually committedFor older changes, refer to the CHANGELOG.md
file.