Get

Trait Get 

Source
pub trait Get: DefinedAt {
    type Value: Clone;

    // Required method
    fn try_get(&self) -> Option<Self::Value>;

    // Provided method
    fn get(&self) -> Self::Value { ... }
}
Expand description

Clones the value of the signal, without tracking the value reactively. and subscribes the active reactive observer (an effect or computed) to changes in its value.

Required Associated Types§

Source

type Value: Clone

The type of the value contained in the signal.

Required Methods§

Source

fn try_get(&self) -> Option<Self::Value>

Subscribes to the signal, then clones and returns the value of the signal, or None if the signal has already been disposed.

Provided Methods§

Source

fn get(&self) -> Self::Value

Subscribes to the signal, then clones and returns the value of the signal.

§Panics

Panics if you try to access a signal that has been disposed.

Implementations on Foreign Types§

Source§

impl<T> Get for Option<T>
where Self: DefinedAt, T: Get,

Source§

type Value = Option<<T as Get>::Value>

Source§

fn try_get(&self) -> Option<Self::Value>

Implementors§

Source§

impl<T> Get for T
where T: With, T::Value: Clone,

Source§

type Value = <T as With>::Value