MCPcopy Create free account
hub / github.com/Ray-D-Song/lexe / as_bytes

Method as_bytes

modules/llrt_buffer/src/array_buffer_view.rs:140–144  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

138 }
139
140 pub fn as_bytes(&self) -> Option<&[u8]> {
141 self.buffer
142 .as_ref()
143 .map(|b| unsafe { std::slice::from_raw_parts(b.ptr.as_ptr(), b.len) })
144 }
145
146 /// Mutable buffer for the view.
147 ///

Callers 15

to_stringMethod · 0.45
allocFunction · 0.45
byte_lengthFunction · 0.45
fromFunction · 0.45
copyFunction · 0.45
safe_byte_sliceFunction · 0.45
atobFunction · 0.45
btoaFunction · 0.45
zlib_converterFunction · 0.45
brotli_converterFunction · 0.45
from_http_headersMethod · 0.45
bytes_from_partsFunction · 0.45

Calls 1

as_refMethod · 0.80

Tested by 1

test_fetch_functionFunction · 0.36