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
//! Document actor implementation for managing automerge documents.
//!
//! Document actors are passive state machines that manage individual documents.
//! They handle loading documents from storage, saving them when needed, and
//! managing their lifecycle.
//!
//! ## Architecture
//!
//! - **State machines**: Actors process messages and return results
//! - **Sans-IO**: All I/O operations are returned as tasks for the caller to execute
//! - **Simple lifecycle**: Initialize → Load → Ready → Terminate
//!
//! ## Usage
//!
//! ```text
//! // Create an actor
//! let actor = DocumentActor::new(document_id);
//!
//! // Initialize it
//! let result = actor.handle_message(now, SamodToActorMessage::Initialize)?;
//!
//! // Execute I/O tasks
//! for io_task in result.io_tasks {
//! let io_result = execute_io(io_task)?;
//! actor.handle_io_complete(now, io_result)?;
//! }
//! ```
pub use DocActorResult;
pub use ;
pub use CompactionHash;
pub use WithDocResult;
// Internal modules for async runtime
pub use ActorInput;
pub use DocumentActor;
pub use DocumentActorId;
pub use DocumentError;
pub use SpawnArgs;