pub trait NodeIdRemap {
// Required method
fn remap_node_ids(&mut self, dom: DomId, map: &NodeIdMap);
}Expand description
Implemented by EVERY manager (or cache) that keys state by NodeId.
One method on purpose: remapping and GC are the same pass, so it is
impossible to do one and forget the other. Implementors MUST, for state
belonging to dom:
- rewrite each key/field
oldtomap.resolve(old), and - drop the state whenever
resolvereturnsNone(unmounted node).
State belonging to any other DomId must be left alone.
Required Methods§
Sourcefn remap_node_ids(&mut self, dom: DomId, map: &NodeIdMap)
fn remap_node_ids(&mut self, dom: DomId, map: &NodeIdMap)
Rewrite all NodeIds for dom and drop state for unmounted nodes.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".