Crate rearch_effects

Source

Structs§

Cloned
A StateTransformer that provides a T where T: Clone as a part of the side effect’s api.
LazyCloned
A StateTransformer that provides a T where T: Clone as a part of the side effect’s api, but takes a lazily-evaluated function as input to initialize the side effect state.
LazyMutRef
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.
LazyRef
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.
MultiSideEffectRegistrar
Allows you to register multiple side effects sequentially, unlike the standard SideEffectRegistrar. Provided by multi.
MutRef
A StateTransformer that provides a &mut T as a part of the side effect’s api.
OverridableCapsule
A Capsule that enables overriding its implementation via OverridableCapsule::set. See overridable_capsule for more.
Ref
A StateTransformer that provides a &T as a part of the side effect’s api.

Traits§

StateTransformer
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 a Clone or a ref).

Functions§

as_listener
A no-op side effect that specifies non-idempotence.
is_first_build
Provides whether or not this is the first build being called.
multi
Allows you to register multiple side effects sequentially, unlike the standard SideEffectRegistrar.
overridable_capsule
Allows you to create a Capsule that can switch between implementations at runtime.
raw
Analogous to SideEffectRegistrar::raw, but uses a StateTransformer to specify the api.
reducer
Models the state reducer pattern via side effects (similar to useReducer from React hooks).
state
Similar to useState from React hooks. Provides a copy of some state and a way to set that state via a callback.
value
Provides the same given value across builds.