Module leptos_reactive::signal_prelude
source · Expand description
This prelude imports all signal types as well as all signal traits needed to use those types.
Modules
- This prelude imports all signal types as well as all signal traits needed to use those types.
Structs
- An efficient derived reactive value based on other reactive values.
- The getter for a reactive signal.
- A signal that combines the getter and setter into one value, rather than separating them into a ReadSignal and a WriteSignal. You may prefer this its style, or it may be easier to pass around in a context or as a function argument.
- A wrapper for any kind of readable reactive signal: a ReadSignal, Memo, RwSignal, or derived signal closure.
- A wrapper for any kind of settable reactive signal: a WriteSignal, RwSignal, or closure that receives a value and sets a signal depending on it.
- The setter for a reactive signal.
Enums
- A wrapper for a value that is either
T
orSignal<T>
.
Traits
- Helper trait for converting
Fn() -> T
closures intoSignal<T>
. - Helper trait for converting
Fn(T)
intoSignalSetter<T>
. - This trait allows disposing a signal before its Scope has been disposed.
- This trait allows getting an owned value of the signals inner type.
- Trait implemented for all signal types which you can
get
a value from, such asReadSignal
,Memo
, etc., which allows getting the inner value without subscribing to the current scope. - This trait allows setting the value of a signal.
- Trait implemented for all signal types which you can
set
the inner value, such asWriteSignal
andRwSignal
, which allows setting the inner value without causing effects which depend on the signal from being run. - This trait allows converting a signal into a async
Stream
. - This trait allows updating the inner value of a signal.
- This trait allows updating the signals value without causing dependant effects to run.
- This trait allows obtaining an immutable reference to the signal’s inner type.
- This trait allows getting a reference to the signals inner value without creating a dependency on the signal.
Functions
- Works exactly as create_signal, but creates multiple signals at once.
- Works exactly as create_many_signals, but applies the map function to each signal pair.
- Creates an efficient derived reactive value based on other reactive values.
- Creates a reactive signal with the getter and setter unified in one value. You may prefer this style, or it may be easier to pass around in a context or as a function argument.
- Creates a conditional signal that only notifies subscribers when a change in the source signal’s value changes whether it is equal to the key value (as determined by PartialEq.)
- Creates a conditional signal that only notifies subscribers when a change in the source signal’s value changes whether the given function is true.
- Creates a signal, the basic reactive primitive.
- Creates a signal that always contains the most recent value emitted by a Stream. If the stream has not yet emitted a value since the signal was created, the signal’s value will be
None
.