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§

source

fn update_untracked(&self, f: impl FnOnce(&mut T))

Runs the provided closure with a mutable reference to the current value without notifying dependents.

source

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§

source

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.

Implementors§