Trait leptos::SignalWithUntracked
source · pub trait SignalWithUntracked {
type Value;
// Required methods
fn with_untracked<O>(&self, f: impl FnOnce(&Self::Value) -> O) -> O;
fn try_with_untracked<O>(
&self,
f: impl FnOnce(&Self::Value) -> O,
) -> Option<O>;
}
Expand description
This trait allows getting a reference to the signals inner value without creating a dependency on the signal.
Required Associated Types§
Required Methods§
sourcefn with_untracked<O>(&self, f: impl FnOnce(&Self::Value) -> O) -> O
fn with_untracked<O>(&self, f: impl FnOnce(&Self::Value) -> O) -> O
Runs the provided closure with a reference to the current value without creating a dependency on the current scope.
§Panics
Panics if you try to access a signal that is owned by a reactive node that has been disposed.
Object Safety§
This trait is not object safe.