Expand description
§Floem Reactive
RwSignal::new_split
returns a separated ReadSignal
and WriteSignal
for a variable.
An existing RwSignal
may be converted using RwSignal::read_only
and RwSignal::write_only
where necessary, but the reverse is not possible.
Structs§
- Base
Signal - BaseSignal gives you another way to control the lifetime of a Signal apart from Scope.
- Derived
RwSignal - A signal that is derived from an RwSignal but lets you specify getters and setters for the signal.
- Memo
- Memo computes the value from the closure on creation, and stores the value.
- Read
Signal - A getter only Signal
- Read
Signal Value - RwSignal
- A read write Signal which can act as both a Getter and a Setter
- Scope
- You can manually control Signal’s lifetime by using Scope.
- Trigger
- Write
Signal - A setter only Signal
- Write
Signal Value
Traits§
Functions§
- as_
child_ of_ current_ scope - Wrap the closure so that whenever the closure runs, it will be under a child Scope of the current Scope
- batch
- create_
base_ signal - create_
derived_ rw_ signal - create_
effect - Create an Effect that runs the given function whenever the Signals that subscribed to it in the function.
- create_
memo - Create a Memo which takes the computed value of the given function, and triggers the reactive system when the computed value is different with the last computed value.
- create_
rw_ signal - Creates a new RwSignal which can act both as a setter and a getter.
- create_
signal - Creates a new setter and getter Signal.
- create_
stateful_ updater - Create an effect updater that runs
on_change
when any signalscompute
subscribes to changes.compute
is immediately run and its return value is returned fromcreate_updater
. - create_
trigger - create_
updater - Create an effect updater that runs
on_change
when any signalscompute
subscribes to changes.compute
is immediately run and its return value is returned fromcreate_updater
. - provide_
context - Sets a context value to be stored in the reactive system. The stored context value can be retrieved from anywhere by using use_context
- untrack
- Signals that’s wrapped this untrack will not subscribe to any effect
- use_
context - Try to retrieve a stored Context value in the reactive system. You can store a Context value anywhere, and retrieve it from anywhere afterwards.
- with_
scope - Runs the given code with the given Scope