1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright 2026 Mark Alan Boykin
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: MPL-2.0
//! Append-only journals over muniment storage.
//!
//! A [`Journal<T>`] is a linear log of immutable entries you
//! [`append`](Journal::append) and [`replay`](Journal::replay) to reconstruct the
//! state they describe. Edits are never destroyed; a change is a new entry.
//!
//! It is the event-source and nondestructive-history primitive shared across the
//! Merely apps: isometry's session events, strophe's edit history, mere's graph
//! mutations. Each stamps entries with a monotonic [`Seq`] that stays valid for
//! the life of the log, so a reader or peer can hold one as a durable cursor and
//! catch up with [`from`](Journal::from) / [`replay_from`](Journal::replay_from).
//! Journals persist whole through a muniment slot ([`persist`]), or one entry
//! per key so an append is one small write ([`entries`]). They are
//! transport-neutral: shipping the replayable sequence to peers remains the
//! consumer's job.
//!
//! # Storage is a sequence; shape is a graph
//!
//! Entries are a flat, monotonic list, which is what makes append, replay, and
//! persistence cheap. Causality rides beside them as parent links, so a log can
//! also answer what led to an entry, what followed from it, and which entries
//! were genuinely concurrent. Opt in with
//! [`append_caused_by`](Journal::append_caused_by); plain
//! [`append`](Journal::append) claims no causes and behaves exactly as before.
//! See [`causal`] for the invariant that makes this nearly free.
//!
//! This replaces the crate's earlier scope note that a branching edit-tree was
//! a later shape. It is this shape, and it arrived without disturbing the
//! linear one.
pub use CausalError;
pub use entry_key;
pub use ;
pub use Journal;
pub use Seq;