MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / get_mut

Method get_mut

native/shared/src/handles.rs:37–43  ·  view source on GitHub ↗

Get a mutable reference to the item at the given handle.

(&mut self, handle: f64)

Source from the content-addressed store, hash-verified

35
36 /// Get a mutable reference to the item at the given handle.
37 pub fn get_mut(&mut self, handle: f64) -> Option<&mut T> {
38 let idx = handle as usize;
39 if idx == 0 || idx > self.items.len() {
40 return None;
41 }
42 self.items[idx - 1].as_mut()
43 }
44
45 /// Free the item at the given handle.
46 pub fn free(&mut self, handle: f64) -> Option<T> {

Callers 15

destroyFunction · 0.80
mutateFunction · 0.80
engineFunction · 0.80
wndprocFunction · 0.80
wasapi_audio_threadFunction · 0.80
engineFunction · 0.80
bloom_android_on_touchFunction · 0.80
on_audio_readyMethod · 0.80
engineFunction · 0.80
handle_touchesFunction · 0.80
audio_render_callbackFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected