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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! RYO Storage - Persistent storage and transaction log
//!
//! This crate provides:
//! - **Storage**: Session persistence and replay
//! - **TxLog**: Transaction logging for undo/redo and replay
//!
//! # Architecture
//!
//! ```text
//! ┌─────────────────────────────────────────────────────────────────────────┐
//! │ Layer 1: Mutation (Functional Layer) │
//! │ - trait Mutation { apply(), describe(), ... } │
//! └─────────────────────────────────────────────────────────────────────────┘
//! ↓ generates at execution time
//! ┌─────────────────────────────────────────────────────────────────────────┐
//! │ Layer 2: MutationRecord (Recording Layer) │
//! │ - Serializable record of each mutation │
//! │ - Contains: MutationSpec + StateRef(pre) + StateRef(post) │
//! └─────────────────────────────────────────────────────────────────────────┘
//! ↓ references
//! ┌─────────────────────────────────────────────────────────────────────────┐
//! │ Layer 3: StateStore (State Layer) │
//! │ - Content-addressed storage for file states │
//! │ - Immutable: StateRef = hash of content │
//! └─────────────────────────────────────────────────────────────────────────┘
//! ```
//!
//! # Usage
//!
//! ```ignore
//! use ryo_storage::{RyoStorage, TxLog, TxLogger};
//!
//! // Create storage
//! let mut storage = RyoStorage::global()?;
//! storage.ensure_init()?;
//!
//! // Start logging
//! let logger = TxLogger::start(project_path, file_count);
//! logger.log_mutation("Rename", "foo → bar", 3);
//! let log = logger.finish();
//!
//! // Save session
//! let session_id = storage.dump(&log)?;
//!
//! // Load and replay
//! let loaded = storage.load(&session_id)?;
//! ```
// Re-export storage types
pub use ;
// Re-export txlog types
pub use ;
// Re-export UUID storage types
pub use FileUuidStorage;