pub struct DynamicNode { /* private fields */ }Expand description
A closure-based dynamic node that re-renders when its dependency signals change.
Holds a boxed 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
impl DynamicNode
pub fn get_render_fn(&self) -> &Rc<RefCell<dyn FnMut() -> VirtualNode>>
pub fn set_render_fn( &mut self, val: Rc<RefCell<dyn FnMut() -> VirtualNode>>, ) -> &mut Self
pub fn get_mut_render_fn( &mut self, ) -> &mut Rc<RefCell<dyn FnMut() -> VirtualNode>>
pub fn get_hook_context(&self) -> HookContext
pub fn set_hook_context(&mut self, val: HookContext) -> &mut Self
pub fn get_mut_hook_context(&mut self) -> &mut HookContext
Trait Implementations§
Source§impl Clone for DynamicNode
Clones a DynamicNode by cloning its HookContext (Copy) and render_fn (Rc).
impl Clone for DynamicNode
Clones a DynamicNode by cloning its HookContext (Copy) and render_fn (Rc).
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