1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
use *;
/// A RAII wrapper around a raw pointer that frees the allocation on drop.
///
/// Used to ensure heap allocations captured by closures are properly freed
/// when the closure is dropped (e.g., when a DynamicNode is cleaned up).
///
/// # Safety
///
/// The pointer must have been allocated via `Box::into_raw`. Only one
/// `OwnedPtr` should exist per allocation (no aliasing ownership).
pub
/// Per-dynamic-mount state coalesced into a single heap allocation.
///
/// OPT 16: previously, `setup_dynamic_node` allocated three separate
/// `Box`-backed chunks per dynamic mount — `Box<Renderer>` for the
/// sub-renderer, `Box<usize>` for the last-arm index, and
/// `Box<dyn FnMut()>` for the re-render callback. These have been
/// consolidated: the renderer and the `last_arm` index now live
/// inside a single `Box<DynamicState>`, and the closure captures a
/// raw pointer to it. This halves the per-mount allocation count
/// and improves locality because the sub-renderer and its arm index
/// are guaranteed to be on the same cache line.
pub
/// Manages the rendering of virtual DOM nodes to the real DOM.
///
/// Maintains a mapping between virtual nodes and real DOM elements,
/// and handles creation, diffing, and patching of the DOM tree.
pub
/// A zero-sized struct providing a static method for mounting
/// virtual DOM trees into the real DOM.
///
/// `Mount::mount()` is the entry point for rendering a virtual DOM tree
/// to a real DOM element selected by a CSS selector.
pub ;