pub struct RwSignal<T> { /* private fields */ }Expand description
A signal that can be read and written.
Created with RwSignal::new, or split into a ReadSignal and a
WriteSignal by signal_local. Cloning the handle is cheap, and
every clone names the same signal.
Implementations§
Source§impl<T: 'static> RwSignal<T>
impl<T: 'static> RwSignal<T>
Sourcepub fn new(value: T) -> RwSignal<T>
pub fn new(value: T) -> RwSignal<T>
Creates a signal holding value, under the current owner.
The signal is disposed when that owner is cleaned up. Handles that outlive it keep the value readable but notify nothing. With no current owner nothing disposes it, and its entry in the runtime stays until the thread ends.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for RwSignal<T>
impl<T> !Send for RwSignal<T>
impl<T> !Sync for RwSignal<T>
impl<T> !UnwindSafe for RwSignal<T>
impl<T> Forget for RwSignal<T>
impl<T> Freeze for RwSignal<T>
impl<T> Move for RwSignal<T>
impl<T> Unpin for RwSignal<T>
impl<T> UnsafeUnpin for RwSignal<T>where
Rc<SignalData<T>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more