mmtkvdb 0.5.0

Memory-mapped key-value database using LMDB
Documentation

mmtkvdb

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.

Safety

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.

API Documentation

For documentation on how to use this crate, refer to the example in src/lib.rs.

License

See contained LICENSE file (MIT License).

Changelog

  • 2022-07-01: Version 0.5.0
    • Use deref_owned version 0.6.1
    • deref_owned::GenericCow and deref_owned::Owned are no longer re-exported
  • 2022-06-30: Version 0.4.1
    • Use deref_owned version 0.4.0
  • 2022-06-29: Version 0.4.0
    • Use crate deref_owned instead of own module owning_pointer
      • Use deref_owned::Owned instead of owning_pointer::Owned
      • Use deref_owned::IntoOwned instead of owning_pointer::PointerIntoOwned
      • Use Vec<T> instead of owning_pointer::OwnedPointer<Vec<T>> (as deref_owned::IntoOwned is implemented for Vec<T>)
      • Re-export deref_owned::{Owned, IntoOwned} in module storable
      • Re-export deref_owned::IntoOwned in crate-level module
    • Provide macro impl_ord_for_storable, which allows automatic implementation of PartialEq, Eq, PartialOrd, and Ord for types which implement Storable
    • Set Storable::TRIVIAL_CMP to true in more cases to improve performance and make default implementation of Storable::cmp_bytes_unchecked do a trivial comparison if constant is true
    • Better documentation/explanation of GAT storable::Storable::AlignedRef
  • 2022-06-20: Version 0.3.1
    • Accept StorableRef instead of references to Storable in more places
      • Allow passing StorableRef instead of reference to Storable as key to method Txn::get_owned (which was already allowed for Txn::get)
      • More generic implementation of StorableRef for tuples (e.g. (&i32, &String) in addition to (&i32, &str)), which enhances usability in some cases
  • 2022-05-26: Version 0.3.0
    • Storing owned types differently
      • Removed implementation of Storable for certain smart pointers such as Vec<u8> and String
      • New traits BorrowStorable and StorableRef which handle storing tuples in a more efficient way (without unnecessary cloning/copying)
    • Improved documentation in module storable
    • Minor style change: Renamed type arg from X to T for generic structs in owning_pointer

For older changes, refer to the CHANGELOG.md file.