Skip to main content

ashlar_store/
lib.rs

1//! Documents: Arc snapshots, revisions, undo history, versioned formats with migrations, autosave.
2//!
3//! - [`Store`]: the document as an `Arc<D>`, edited copy-on-write, with a [`Revision`] per state,
4//!   undo/redo, merged gestures, compound edits ([`Transaction`]) and dirty tracking.
5//! - [`History`]: the undo stacks on their own (labels, extra state, merge keys, step and byte
6//!   limits, optional branches).
7//! - [`Tracked`] and [`Memo`]: per-part revisions and small revision-keyed caches for views.
8//! - [`SnapshotCell`]: the latest snapshot for real-time and worker threads, lock-free.
9//! - [`Format`]: the file envelope, migrations, refusal of newer and foreign files, durable saves.
10//! - [`Autosave`]: an autosave ring with crash detection and [`RecoveryCandidate`]s.
11//!
12//! Headless and wasm32-clean (the background autosave writer is native only).
13#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
14
15pub mod autosave;
16pub mod format;
17pub mod history;
18pub mod revision;
19pub mod snapshot;
20pub mod store;
21
22#[cfg(not(target_arch = "wasm32"))]
23pub use autosave::BackgroundWriter;
24pub use autosave::{Autosave, AutosaveConfig, RecoveryCandidate, SessionMeta, SlotWrite};
25pub use format::{Envelope, Format, FormatError, JsonError, Loaded, Migration};
26pub use history::{Branch, Entry, History};
27pub use revision::{Memo, Revision, Tracked, Versioned};
28pub use snapshot::{Published, SnapshotCell};
29pub use store::{Store, Transaction};