Structs§
- Cloned
- A
StateTransformer
that provides aT
whereT: Clone
as a part of the side effect’s api. - Lazy
Cloned - 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. - Lazy
MutRef - 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. - Multi
Side Effect Registrar - Allows you to register multiple side effects sequentially,
unlike the standard
SideEffectRegistrar
. Provided bymulti
. - MutRef
- A
StateTransformer
that provides a&mut T
as a part of the side effect’s api. - Overridable
Capsule - A
Capsule
that enables overriding its implementation viaOverridableCapsule::set
. Seeoverridable_capsule
for more. - Ref
- A
StateTransformer
that provides a&T
as a part of the side effect’s api.
Traits§
- State
Transformer - 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§
- 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 aStateTransformer
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.