pub struct BaseSignal<T: 'static> { /* private fields */ }Expand description
BaseSignal gives you another way to control the lifetime of a Signal apart from Scope. This unsync variant stores its value on the UI thread.
When BaseSignal is dropped, it will dispose the underlying Signal as well. The signal isn’t put in any Scope when a BaseSignal is created, so that the lifetime of the signal can only be determined by BaseSignal rather than Scope dependencies.
Implementations§
Source§impl<T: 'static> BaseSignal<T>
impl<T: 'static> BaseSignal<T>
pub fn new(value: T) -> Self
Sourcepub fn read_only(&self) -> ReadSignal<T>
pub fn read_only(&self) -> ReadSignal<T>
Create a Getter of this Signal
Sourcepub fn write_only(&self) -> WriteSignal<T>
pub fn write_only(&self) -> WriteSignal<T>
Create a Setter of this Signal