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§
Provided Methods§
Sourcefn read(&self) -> ReadSignalValue<T>where
T: 'static,
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.
Sourcefn read_untracked(&self) -> ReadSignalValue<T>where
T: 'static,
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.
Sourcefn try_read(&self) -> Option<ReadSignalValue<T>>where
T: 'static,
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.
Sourcefn try_read_untracked(&self) -> Option<ReadSignalValue<T>>where
T: 'static,
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.