pub enum NodeData {
Signal {
value: Rc<RefCell<dyn Any>>,
},
Effect {
compute: Rc<RefCell<dyn FnMut()>>,
},
Computed {
value: Rc<RefCell<dyn Any>>,
compute: Rc<RefCell<dyn FnMut()>>,
},
}Expand description
The mutable payload of a ReactiveNode. Signals carry a value,
effects carry a compute closure, computed values carry both.
The compute closure is wrapped in Rc<RefCell<…>> so the
scheduler can grab a clone of the handle before invoking it,
keeping the runtime borrow short-lived. User code inside the
closure can then re-borrow the runtime freely.
Variants§
Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for NodeData
impl !Send for NodeData
impl !Sync for NodeData
impl !UnwindSafe for NodeData
impl Freeze for NodeData
impl Unpin for NodeData
impl UnsafeUnpin for NodeData
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