Trait leptos::SignalGetUntracked
source · pub trait SignalGetUntracked {
type Value;
// Required methods
fn get_untracked(&self) -> Self::Value;
fn try_get_untracked(&self) -> Option<Self::Value>;
}
Expand description
Trait implemented for all signal types which you can get
a value
from, such as ReadSignal
,
Memo
, etc., which allows getting the inner value without
subscribing to the current scope.
Required Associated Types§
Required Methods§
sourcefn get_untracked(&self) -> Self::Value
fn get_untracked(&self) -> Self::Value
Gets the signal’s 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.
sourcefn try_get_untracked(&self) -> Option<Self::Value>
fn try_get_untracked(&self) -> Option<Self::Value>
Gets the signal’s value without creating a dependency on the
current scope. Returns [Some(T)
] if the signal is still
valid, None
otherwise.