1#![allow(
20 non_snake_case,
21 unpredictable_function_pointer_comparisons,
22)]
23
24pub mod compose;
25pub mod core;
26pub mod infra;
27#[cfg(feature = "runtime")]
28pub mod runtime;
29pub mod testing;
30
31pub use core::{batch, bus, cmd, effect, error, interp, program, sub};
33pub use compose::{component, optics, reducer, safe_reducer, scope};
34pub use infra::{env, replay, shared};
35pub use testing::{macros, test_runtime, test_support};
36#[cfg(feature = "runtime")]
37pub use testing::test_store;
38#[cfg(feature = "runtime")]
39pub use runtime::{store, subscription};
40
41pub mod keypath {
43pub use key_paths_core::{FieldDiff, hash_value, KeyPath, KpTrait, Readable, RefKpTrait, Writable};
44 pub use rust_key_paths::{EnumKp, EnumKpType, EnumValueKpType, Kp};
45}
46
47pub use batch::batch;
48pub use bus::{Bus, BusSender};
49pub use cmd::Cmd;
50pub use component::{lift, Slot};
51pub use effect::{Effect, EffectId, EnvTaskFn, RunSender, TaskFn};
52pub use dependencies::{
53 Clock, ClockDep, ClockKey, DepRng, DependencyError, DependencyKey, DependencyValues,
54 LiveRng, LiveUuidGen, Now, NowDep, NowKey, RealClock, RngDep, RngKey, SeededRng,
55 SeededUuidGen, TestClock, TestNow, UuidDep, UuidGen, UuidKey,
56};
57pub use rust_dependencies as dependencies;
58pub use env::{defer_batch, Environment, FakeClock, MockHttp};
59pub use error::EffectError;
60pub use interp::{flatten_effects, normalize, InterpretCtx};
61pub use rust_identified_vec::{Identifiable, IdentifiedVec};
62pub use optics::{
63 enum_err, enum_ok, enum_some, enum_variant, variant_of, CasePath, Casepath, EnumKp,
64 EnumKpType, EnumValueKpType, Kp,
65};
66pub use program::{Program, ReducerProgram};
67pub use safe_reducer::{safe_reduce_rollback, safe_reduce_update, SafeReduceError};
68pub use reducer::{coerce_fn, CatchReducer, CombineReducers, Reduce, Reducer, RollbackCatchReducer};
69pub use replay::{ReplayHarness, ReplayLog};
70#[cfg(feature = "serde")]
71pub use replay::StateSnapshot;
72#[cfg(feature = "runtime")]
73pub use runtime::{Runtime, RuntimeConfig, RuntimeError, RwRuntime, TeaRuntime};
74#[cfg(all(feature = "runtime", feature = "arc-swap"))]
75pub use runtime::SwapRuntime;
76pub use scope::{
77 lift_cmd, lift_cmd_with_id, ForEachReducer, IfCaseLetReducer, IfLetReducer, OptionalReducer,
78 ScopeReducer,
79};
80pub use shared::{InMemoryStorage, Shared, SharedSubscriber, Storage, StorageError};
81#[cfg(feature = "serde")]
82pub use shared::FileStorage;
83#[cfg(feature = "runtime")]
84pub use store::{
85 ChangeSet, ChangeSubscriber, ScopedChangeSubscriber, ScopedStore, StateSubscriber, Store,
86 StoreTask, StoreTaskError,
87};
88#[cfg(feature = "runtime")]
89pub use runtime::rw_store::{
90 ReadStore, RwChangeSubscriber, RwStateSubscriber, RwStore, ScopedRwStore,
91};
92#[cfg(feature = "runtime")]
93pub use runtime::tea_store::{
94 ScopedTeaStore, ScopedTeaStateSubscriber, TeaChangeSubscriber, TeaStateSubscriber, TeaStore,
95 TeaStoreError, TeaViewStore,
96};
97#[cfg(all(feature = "runtime", feature = "arc-swap"))]
98pub use runtime::swap_store::{
99 ScopedSwapStore, SnapshotStore, SwapChangeSubscriber, SwapStateSubscriber, SwapStore,
100};
101pub use runtime::binding::{
102 ComposedBinding, ProjectedBinding, ReadProjectedBinding, ReadStateBinding,
103 RwProjectedBinding, RwStateBinding, StateBinding,
104};
105#[cfg(feature = "arc-swap")]
106pub use runtime::binding::{SnapshotProjectedBinding, SnapshotStateBinding};
107pub use sub::Sub;
108pub use test_runtime::TestRuntime;
109#[cfg(feature = "runtime")]
110pub use test_store::{ExhaustiveTestStore, TestStoreError};
111pub use test_support::{
112 allow_state_clones, on_state_clone, replay_snapshot, shared_get, shared_with_mut,
113 start_reducer_runtime, start_runtime, start_rw_reducer_runtime, start_tea_reducer_runtime,
114};
115#[cfg(all(feature = "runtime", feature = "arc-swap"))]
116pub use test_support::start_swap_reducer_runtime;
117#[cfg(feature = "runtime")]
118pub use test_support::{
119 scoped_child_state, scoped_subscribe_state, scoped_subscriber_next, store_state,
120 subscribe_state, subscriber_wait_next,
121};
122
123pub use rust_key_paths;
124pub use key_paths_core;