pub struct Stores { /* private fields */ }Expand description
A complete set of stores.
Cloning shares the same underlying implementations; it never copies data.
Implementations§
Source§impl Stores
impl Stores
Sourcepub fn in_memory() -> Stores
pub fn in_memory() -> Stores
An empty MemoryStores behind every trait.
Sourcepub fn from_memory(backend: Arc<MemoryStores>) -> Stores
pub fn from_memory(backend: Arc<MemoryStores>) -> Stores
Every trait served by one MemoryStores the caller keeps a handle to.
Use it when the test also has to drive the store’s clock or arm a
FailurePoint.
Sourcepub fn builder() -> StoresBuilder
pub fn builder() -> StoresBuilder
A builder that requires every store to be supplied.
Sourcepub fn conversations(&self) -> &Arc<dyn ConversationStore> ⓘ
pub fn conversations(&self) -> &Arc<dyn ConversationStore> ⓘ
Conversations, turns and phase markers.
Sourcepub fn interactions(&self) -> &Arc<dyn InteractionStore> ⓘ
pub fn interactions(&self) -> &Arc<dyn InteractionStore> ⓘ
Persisted interactions.
Sourcepub fn journal(&self) -> &Arc<dyn CommandJournal> ⓘ
pub fn journal(&self) -> &Arc<dyn CommandJournal> ⓘ
The command journal.
Sourcepub fn events(&self) -> &Arc<dyn EventJournal> ⓘ
pub fn events(&self) -> &Arc<dyn EventJournal> ⓘ
The claim ledger.
Sourcepub fn outbox(&self) -> &Arc<dyn OutboxStore> ⓘ
pub fn outbox(&self) -> &Arc<dyn OutboxStore> ⓘ
The external-effect outbox.
Sourcepub fn replay(&self) -> &Arc<dyn ReplayStore> ⓘ
pub fn replay(&self) -> &Arc<dyn ReplayStore> ⓘ
Replay records.
Sourcepub fn commit(&self) -> &Arc<dyn CommitStore> ⓘ
pub fn commit(&self) -> &Arc<dyn CommitStore> ⓘ
The all-or-nothing bundle writer.
Sourcepub fn read_only(&self) -> ReadOnlyStores
pub fn read_only(&self) -> ReadOnlyStores
The same persistence layer with the write side removed (spec §23, plan-only path).
Each store is upcast to its read half, so the returned value has no
method that changes anything and no way to recover one: there is no
downcast back to Stores, and CommitStore — which is write-only —
is simply absent. It is what a caller hands to a path that must be
unable to write, such as
Orchestrator::plan_turn, so that
“this path does not persist anything” is checked by the compiler rather
than by review.