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.
Implementations§
Source§impl DynamicNode
Implementation of dynamic node accessor methods.
impl DynamicNode
Implementation of dynamic node accessor methods.
Sourcepub fn render(&self) -> VirtualNode
pub fn render(&self) -> VirtualNode
Invokes the render closure and returns the produced virtual node.
§Returns
Self- The virtual node produced by the render closure.
Source§impl DynamicNode
impl DynamicNode
pub fn get_mut_render_fn(&mut self) -> &mut Rc<RefCell<RenderFnInner>>
pub fn get_mut_hook_context(&mut self) -> &mut HookContext
Source§impl DynamicNode
impl DynamicNode
pub fn new( render_fn: Rc<RefCell<RenderFnInner>>, hook_context: HookContext, ) -> Self
Trait Implementations§
Source§impl Clone for DynamicNode
Clones a DynamicNode by cloning the shared references.
impl Clone for DynamicNode
Clones a DynamicNode by cloning the shared references.
Source§impl Debug for DynamicNode
impl Debug for DynamicNode
Auto Trait Implementations§
impl Freeze for DynamicNode
impl !RefUnwindSafe for DynamicNode
impl !Send for DynamicNode
impl !Sync for DynamicNode
impl Unpin for DynamicNode
impl UnsafeUnpin for DynamicNode
impl !UnwindSafe for DynamicNode
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