pub trait SignalGetUntracked<T> {
    // Required methods
    fn get_untracked(&self) -> T;
    fn try_get_untracked(&self) -> Option<T>;
}
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 Methods§

source

fn get_untracked(&self) -> T

Gets the signal’s value without creating a dependency on the current scope.

Panics

Panics if you try to access a signal that was created in a Scope that has been disposed.

source

fn try_get_untracked(&self) -> Option<T>

Gets the signal’s value without creating a dependency on the current scope. Returns [Some(T)] if the signal is still valid, None otherwise.

Implementors§

source§

impl<T> SignalGetUntracked<T> for MaybeSignal<T>where T: Clone,

source§

impl<T> SignalGetUntracked<T> for Memo<T>where T: Clone,

source§

impl<T> SignalGetUntracked<T> for ReadSignal<T>where T: Clone,

source§

impl<T> SignalGetUntracked<T> for RwSignal<T>where T: Clone,

source§

impl<T> SignalGetUntracked<T> for Signal<T>where T: Clone,

Please note that using Signal::with_untracked still clones the inner value, so there’s no benefit to using it as opposed to calling Signal::get_untracked.