pub trait SignalUpdateUntracked<T> {
// Required methods
fn update_untracked(&self, f: impl FnOnce(&mut T));
fn try_update_untracked<O>(&self, f: impl FnOnce(&mut T) -> O) -> Option<O>;
// Provided method
fn update_returning_untracked<U>(
&self,
f: impl FnOnce(&mut T) -> U
) -> Option<U> { ... }
}
Expand description
This trait allows updating the signals value without causing dependant effects to run.
Required Methods§
sourcefn update_untracked(&self, f: impl FnOnce(&mut T))
fn update_untracked(&self, f: impl FnOnce(&mut T))
Runs the provided closure with a mutable reference to the current value without notifying dependents.
sourcefn try_update_untracked<O>(&self, f: impl FnOnce(&mut T) -> O) -> Option<O>
fn try_update_untracked<O>(&self, f: impl FnOnce(&mut T) -> O) -> Option<O>
Runs the provided closure with a mutable reference to the current value without notifying dependents and returns the value the closure returned.
Provided Methods§
sourcefn update_returning_untracked<U>(
&self,
f: impl FnOnce(&mut T) -> U
) -> Option<U>
fn update_returning_untracked<U>( &self, f: impl FnOnce(&mut T) -> U ) -> Option<U>
👎Deprecated: Please use
try_update_untracked
instead. This method will be removed in a future version of leptos
Runs the provided closure with a mutable reference to the current value without notifying dependents and returns the value the closure returned.