MCPcopy Create free account
hub / github.com/PerroEngine/Perro / remove

Method remove

perro_source/runtime_project/perro_runtime/src/cns/node_arena.rs:223–239  ·  view source on GitHub ↗

Remove a node and invalidate old ids for that slot. Successful removal bumps the slot generation and pushes the slot onto the free list for later reuse.

(&mut self, id: NodeID)

Source from the content-addressed store, hash-verified

221 .expect("tracked node slot stays live while borrowed")
222 }
223}
224
225impl DerefMut for NodeMut<'_> {
226 fn deref_mut(&mut self) -> &mut Self::Target {
227 self.arena.nodes[self.index]
228 .as_mut()
229 .expect("tracked node slot stays live while borrowed")
230 }
231}
232
233impl Drop for NodeMut<'_> {
234 fn drop(&mut self) {
235 let (new_name_hash, name_empty, new_tags_hash, new_parent, new_node_type, children_changed) = {
236 let node = self.arena.nodes[self.index]
237 .as_ref()
238 .expect("tracked node slot stays live while borrowed");
239 (
240 string_to_u64(node.get_name()),
241 node.get_name().is_empty(),
242 tags_hash(&node.tags),

Callers 15

clear_mesh_metaMethod · 0.45
clear_texture_metaMethod · 0.45
clear_material_metaMethod · 0.45
drop_texture_innerMethod · 0.45
drop_mesh_innerMethod · 0.45
drop_material_innerMethod · 0.45
poll_async_mesh_loadsMethod · 0.45

Calls 6

valid_slotMethod · 0.80
bump_mutation_versionMethod · 0.80
cloneMethod · 0.80
unindex_nameMethod · 0.80
unindex_tagMethod · 0.80
pushMethod · 0.45