typed-sled - a database build on top of sled

API

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.

Example

```rust use serde::{Deserialize, Serialize};

[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]

struct SomeValue(u32);

// Creating a temporary sled database let db = sled::Config::new().temporary(true).open().unwrap();

// The id is used by sled to identify which Tree in the database (db) to open let tree = typedsled::Tree::::open(&db, "uniqueid");

// insert and get, similar to std's BTreeMap tree.insert(&"somekey".toowned(), &SomeValue(10))?;

asserteq!(tree.get(&"somekey".to_owned())?, Some(SomeValue(10))); Ok(())

```

features

Multiple features for common use cases are available: