Trait SignalRead

Source
pub trait SignalRead<T> {
    // Required method
    fn id(&self) -> Id;

    // Provided methods
    fn read(&self) -> ReadSignalValue<T>
       where T: 'static { ... }
    fn read_untracked(&self) -> ReadSignalValue<T>
       where T: 'static { ... }
    fn try_read(&self) -> Option<ReadSignalValue<T>>
       where T: 'static { ... }
    fn try_read_untracked(&self) -> Option<ReadSignalValue<T>>
       where T: 'static { ... }
}

Required Methods§

Source

fn id(&self) -> Id

get the Signal Id

Provided Methods§

Source

fn read(&self) -> ReadSignalValue<T>
where T: 'static,

Reads the data stored in the Signal to a RefCell, so that you can borrow() and access the data. It subscribes to the current running effect.

Source

fn read_untracked(&self) -> ReadSignalValue<T>
where T: 'static,

Reads the data stored in the Signal to a RefCell, so that you can borrow() and access the data. It doesn’t subscribe to the current running effect.

Source

fn try_read(&self) -> Option<ReadSignalValue<T>>
where T: 'static,

If the signal isn’t disposed, reads the data stored in the Signal to a RefCell, so that you can borrow() and access the data. It subscribes to the current running effect.

Source

fn try_read_untracked(&self) -> Option<ReadSignalValue<T>>
where T: 'static,

If the signal isn’t disposed, reads the data stored in the Signal to a RefCell, so that you can borrow() and access the data. It doesn’t subscribe to the current running effect.

Implementors§

Source§

impl<T> SignalRead<T> for ReadSignal<T>

Source§

impl<T> SignalRead<T> for RwSignal<T>