Expand description
typed-sled - a database build on top of sled.
sled is a high-performance embedded database with an API that is similar to a BTreeMap<[u8], [u8]>
.
typed-sled builds on top of sled and offers an API that is similar to a BTreeMap<K, V>
, where
K and V are user defined types which implement [Deserialize][serde::Deserialize] and [Serialize][serde::Serialize].
§features
Multiple features for common use cases are also available:
- [search]:
SearchEngine
on top of aTree
. - [key_generating]: Create
Tree
s with automatically generated keys. - [convert]: Convert any
Tree
into anotherTree
with different key and value types.
Modules§
Structs§
- Batch
- Compare
AndSwap Error - Compare and swap error.
- Config
- Top-level configuration for the system.
- Iter
- Subscriber
- Tree
- A flash-sympathetic persistent lock-free B+ tree.
Enums§
Constants§
Traits§
- Key
- Trait alias for bounds required on keys and values. For now only types that implement DeserializeOwned are supported.
- Merge
Operator - Examples
- Value
Functions§
- deserialize
- The function which is used to deserialize all keys and values.
- open
- Opens a
Db
with a default configuration at the specified path. This will create a new storage directory at the specified path if it does not already exist. You can use theDb::was_recovered
method to determine if your database was recovered from a previous instance. You can useConfig::create_new
if you want to increase the chances that the database will be freshly created. - serialize
- The function which is used to serialize all keys and values.