Skip to main content

SignalGetter

Trait SignalGetter 

Source
pub trait SignalGetter<T>: SignalBase<T>
where T: Clone + 'static,
{ // Provided methods fn peek(&self) -> T { ... } fn value(&self) -> T { ... } }

Provided Methods§

Source

fn peek(&self) -> T

Returns the current value of the signal without tracking updates.

If updates should be tracked, use Self::value().

Source

fn value(&self) -> T

Return the value of the signal and appends it to the current scope’s dependencies. If the values changes, the scope gets reexecuted to update to the new value.

If update should not be tracked, use Self::peek().

Implementors§

Source§

impl<S, T> SignalGetter<T> for GlobalWrapper<S>
where S: SignalGetter<T>, T: Clone + 'static,

Source§

impl<T> SignalGetter<T> for Calculated<T>
where T: Clone + 'static,

Source§

impl<T> SignalGetter<T> for Context<T>
where T: Clone + 'static,

Source§

impl<T> SignalGetter<T> for GlobalSignal<T>
where T: Clone + 'static,

Source§

impl<T> SignalGetter<T> for QuerySignal<T>
where T: Clone + 'static,

Source§

impl<T> SignalGetter<T> for Signal<T>
where T: Clone + 'static,

Source§

impl<T> SignalGetter<T> for StorageSignal<T>
where T: Clone + 'static,