MCPcopy Create free account
hub / github.com/awslabs/llrt / as_bytes_mut

Method as_bytes_mut

modules/llrt_buffer/src/array_buffer_view.rs:153–157  ·  view source on GitHub ↗

Mutable buffer for the view. # Safety This is only safe if you have a lock on the runtime. Do not pass it directly to other threads.

(&mut self)

Source from the content-addressed store, hash-verified

151 /// This is only safe if you have a lock on the runtime.
152 /// Do not pass it directly to other threads.
153 pub fn as_bytes_mut(&mut self) -> Option<&mut [u8]> {
154 self.buffer
155 .as_ref()
156 .map(|b| unsafe { std::slice::from_raw_parts_mut(b.ptr.as_ptr(), b.len) })
157 }
158}

Callers 4

normalize_typeFunction · 0.80
readMethod · 0.80
replace_backslashFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected