struct
Signal
pub struct Signal<T: 'static> {
/* private fields */
}A reactive, shared, mutable value. Cloning a signal yields another handle to the same value.
Methods
with
pub fn with<R>(&self, f: impl FnOnce(&T) -> R) -> RRead the value by reference, subscribing the current effect.
with_untracked
pub fn with_untracked<R>(&self, f: impl FnOnce(&T) -> R) -> RRead the value by reference without subscribing.
subscriber_count
pub fn subscriber_count(&self) -> usizeNumber of live effects currently subscribed to this signal.
set_if_changed
pub fn set_if_changed(&self, value: T) -> boolSet the value only if it differs; returns whether it changed.