sled is a high-performance embedded database with
an API that is similar to a BTreeMap<[u8], [u8]>,
but with several additional capabilities for
assisting creators of stateful systems.
A sequential store which allows users to create
reservations placed at known log offsets, used
for writing persistent data structures that need
to know where to find persisted bits in the future.
A function that may be configured on a particular shared Tree
that will be applied as a kind of read-modify-write operator
to any values that are written using the Tree::merge method.
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 the Db::was_recovered
method to determine if your database was recovered
from a previous instance. You can use Config::create_new
if you want to increase the chances that the database
will be freshly created.
The top-level result type for dealing with
fallible operations. The errors tend to
be fail-stop, and nested results are used
in cases where the outer fail-stop error can
have try ? used on it, exposing the inner
operation that is expected to fail under
normal operation. The philosophy behind this
is detailed on the sled blog.