pub struct DynamicNode { /* private fields */ }Expand description
A closure-based dynamic node that re-renders when its dependency signals change.
Holds a shared reference to a heap-allocated render closure that produces a fresh
VirtualNode on each evaluation. The renderer subscribes to the closure’s
signals and patches the DOM automatically.
Contains a HookContext that persists hook state (like use_signal) across
re-renders, ensuring that signal values are not reset when the render function
is called again.
Uses Rc<UnsafeCell<>> instead of Rc<RefCell<>> to avoid runtime borrow
checking overhead. Safety is guaranteed by the single-threaded WASM context.
The Rc provides automatic memory management — the render closure is freed
when the last reference (either in the VirtualNode tree or the signal update
callback) is dropped.
Trait Implementations§
Source§impl Clone for DynamicNode
impl Clone for DynamicNode
Source§impl Debug for DynamicNode
impl Debug for DynamicNode
Source§impl Default for DynamicNode
Provides a default empty dynamic node with a no-op render function.
impl Default for DynamicNode
Provides a default empty dynamic node with a no-op render function.
Source§fn default() -> Self
fn default() -> Self
Constructs a default DynamicNode value.