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
//! Actor module — power-user building blocks for custom broker topologies.
//!
//! # Overview
//!
//! The actor types let users build their own broker without touching the
//! crate internals:
//!
//! - [`TopicMsg`] — the message enum exchanged between actors and callers.
//! - [`TopicActor`] — owns a single topic's state, runs an mpsc loop.
//! - [`TopicRegistry`] — lazy `DashMap` of topic name → actor.
//! - [`LocalActorRef`] — type-safe `mpsc::Sender` wrapper.
//! - [`RemoteActorRef`] — stub for cross-process actors.
//!
//! # Example
//!
//! ```no_run
//! use std::sync::Arc;
//! use std::time::Duration;
//! use rifts::actor::{TopicRegistry, LocalActorRef, TopicMsg};
//! use rifts::storage::{MemoryOffsetStore, MemoryLogStore, MemoryDedupeStore, MemorySnapshotStore};
//! use rifts::topic::TopicProfile;
//!
//! let registry = TopicRegistry::new(
//! Arc::new(MemoryOffsetStore::new()),
//! Arc::new(MemoryLogStore::new()),
//! Arc::new(MemoryDedupeStore::new()),
//! Arc::new(MemorySnapshotStore::new()),
//! TopicProfile::default(),
//! Duration::from_secs(60),
//! );
//!
//! // Get or spawn the actor for room/1.
//! let room_actor: LocalActorRef<TopicMsg> = registry.get_or_spawn("room/1");
//! ```
pub use ;
pub use ;
pub use TopicRegistry;
pub use TopicActor;