Crate rearch_effects
source ·Structs§
- A
StateTransformer
that provides aT
whereT: Clone
as a part of the side effect’s api, but takes a lazily-evaluated function as input to initialize the side effect state. - A
StateTransformer
that provides a&mut T
as a part of the side effect’s api, but takes a lazily-evaluated function as input to initialize the side effect state. - A
StateTransformer
that provides a&T
as a part of the side effect’s api, but takes a lazily-evaluated function as input to initialize the side effect state. - Allows you to register multiple side effects sequentially, unlike the standard
SideEffectRegistrar
. Provided bymulti
. - A
StateTransformer
that provides a&mut T
as a part of the side effect’s api. - A
Capsule
that enables overriding its implementation viaOverridableCapsule::set
. Seeoverridable_capsule
for more. - A
StateTransformer
that provides a&T
as a part of the side effect’s api.
Traits§
- A way to re-use the same exact side effect code while providing a different
SideEffect::Api
based on the data you have and the data you want in return (such as aClone
or a ref).
Functions§
- A no-op side effect that specifies non-idempotence.
- Provides whether or not this is the first build being called.
- Allows you to register multiple side effects sequentially, unlike the standard
SideEffectRegistrar
. - Allows you to create a
Capsule
that can switch between implementations at runtime. - Analogous to
SideEffectRegistrar::raw
, but uses aStateTransformer
to specify the api. - Models the state reducer pattern via side effects (similar to
useReducer
from React hooks). - Similar to
useState
from React hooks. Provides a copy of some state and a way to set that state via a callback. - Provides the same given value across builds.