Expand description
Test helpers for asserting store/reducer paths do not clone feature state.
Wrap reducer state types with [panic_on_state_clone!] and allow only explicit
clones via allow_state_clones.
Functions§
- allow_
state_ clones - Temporarily allow
countfeature-state clones on this thread. - on_
state_ clone - Panics unless the current thread has remaining clone budget from
allow_state_clones. - replay_
snapshot - [
ReplayHarness::snapshot] clones feature state once. - scoped_
child_ state - [
ScopedStore::child_state] clones parent state once via [Store::state]. - scoped_
subscribe_ state - [
ScopedStore::subscribe_state] clones parent state once when the subscriber is created. - scoped_
subscriber_ next - One
ScopedStateSubscriber::nextmay clone parent feature state once. - shared_
get - [
Shared::get] clones feature state once. - shared_
with_ mut - [
Shared::with_mut] clones feature state once to detect changes. - start_
reducer_ runtime - Start a
Runtimefrom aReducerProgram. - start_
runtime - Start a
Runtimein tests/examples; panics only if bootstrap fails. - start_
rw_ reducer_ runtime - start_
tea_ reducer_ runtime - store_
state - [
Store::state] clones feature state once — use in tests that intentionally read a snapshot. - subscribe_
state - [
Store::subscribe_state] clones once when the subscriber is created. - subscriber_
wait_ next - One
StateSubscriber::next/StateSubscriber::wait_nextmay clone feature state once.