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
use *;
/// A single op in the keyed-patch move plan, computed by
/// [`compute_child_ops_plan`](super::compute_child_ops_plan).
///
/// The enum is consumed verbatim by `patch_children_keyed`, which
/// translates each variant into a [`crate::dom_ops::ChildOp`]. The
/// plan is generated in execution order: every `Remove` for a
/// disappearing old key is emitted before any `Move` / `Insert`, so
/// the renderer's removal pass can detach stale nodes first. After
/// the removes, the planner walks `new_keys` in order, emitting
/// `Keep` / `MoveBefore` / `InsertBefore`. Each non-`Keep` variant
/// anchors relative to the previously-emitted child's `new_index`,
/// which guarantees the `insert_before` reference is a node already
/// at its final DOM position (and therefore not about to be detached
/// by a pending remove).
///
/// `new_index` values refer to positions in the `new_keys` slice
/// passed to the planner (and to the post-patch DOM). `old_index`
/// values refer to positions in the `old_keys` slice.
pub