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

Method to_string

modules/llrt_buffer/src/buffer.rs:52–56  ·  view source on GitHub ↗
(&self, ctx: &Ctx<'js>, encoding: &str)

Source from the content-addressed store, hash-verified

50
51 if byte_offset > raw.len || byte_length > raw.len - byte_offset {
52 return Err(Exception::throw_range(
53 ctx,
54 "The value of \"byteOffset\" is out of range",
55 ));
56 }
57
58 // SAFETY: bounds checked above.
59 Ok(unsafe { slice::from_raw_parts_mut(raw.ptr.as_ptr().add(byte_offset), byte_length) })

Callers 11

allocFunction · 0.45
byte_lengthFunction · 0.45
is_encodingFunction · 0.45
get_write_parametersFunction · 0.45
test_subarrayFunction · 0.45
test_subarray_partialFunction · 0.45
test_read_int_32_beFunction · 0.45
newMethod · 0.45
textMethod · 0.45
array_to_stringFunction · 0.45

Calls 2

or_throwMethod · 0.80
encode_to_stringMethod · 0.80

Tested by 4

test_subarrayFunction · 0.36
test_subarray_partialFunction · 0.36
test_read_int_32_beFunction · 0.36