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

Method get_mut

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

Get a mutable node by id. Returns `None` for nil ids, stale generations, out-of-bounds slots, or empty slots.

(&mut self, id: NodeID)

Source from the content-addressed store, hash-verified

199
200 /// Create an empty arena.
201 ///
202 /// Slot 0 is reserved as the nil sentinel, so the first inserted node uses
203 /// index 1.
204 pub fn new() -> Self {
205 // Reserve index 0 as invalid/nil sentinel so first real node ID is 1.
206 let mut nodes = Vec::with_capacity(2);
207 let mut generations = Vec::with_capacity(2);
208 nodes.push(None);

Callers 15

encode_readbackMethod · 0.45
clear_mesh_metaMethod · 0.45
clear_texture_metaMethod · 0.45
clear_material_metaMethod · 0.45
mesh_meta_mutMethod · 0.45
texture_meta_mutMethod · 0.45
material_meta_mutMethod · 0.45
upsert_waterMethod · 0.45

Calls 2

valid_slotMethod · 0.80
bump_mutation_versionMethod · 0.80