docs.rs failed to build sled-0.24.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
sled-0.34.7
sled
is a flash-sympathetic persistent lock-free B+ tree.
Examples
use sled::{Db, IVec};
let t = Db::start_default("my_db").unwrap();
t.set(b"yo!", b"v1".to_vec());
assert_eq!(t.get(b"yo!"), Ok(Some(IVec::from(b"v1"))));
// Atomic compare-and-swap.
t.cas(
b"yo!", // key
Some(b"v1"), // old value, None for not present
Some(b"v2"), // new value, None for delete
).unwrap();
// Iterates over key-value pairs, starting at the given key.
let mut iter = t.scan(b"a non-present key before yo!");
assert_eq!(iter.next().unwrap(), Ok((b"yo!".to_vec(), IVec::from(b"v2"))));
assert_eq!(iter.next(), None);
t.del(b"yo!");
assert_eq!(t.get(b"yo!"), Ok(None));