Crate automerge_persistent

Crate automerge_persistent 

Source
Expand description

A library for constructing efficient persistent automerge documents.

A PersistentAutomerge wraps an automerge::Automerge and handles making the changes applied to it durable. This works by persisting every change before it is applied to the document. Then occasionally the user should call compact to save the document in a more compact format and cleanup the included changes. This strategy aims to be fast while also being space efficient (up to the user’s requirements).

let persister = MemoryPersister::default();
let doc = PersistentAutomerge::load(persister).unwrap();

Structs§

MemoryPersister
For Testing An in-memory persister.
PersistentAutoCommit
A wrapper for a persister and an automerge document.
PersistentAutomerge
A wrapper for a persister and an automerge document.
StoredSizes
Bytes stored for each of the stored types.

Enums§

Error
Errors that persistent documents can return.
TransactionError
Errors that persistent documents can return after a transaction.

Traits§

Persister
A Persister persists both changes and documents to durable storage.

Type Aliases§

TransactionResult