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

Method to_string

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

Source from the content-addressed store, hash-verified

53 }
54
55 pub fn to_string(&self, ctx: &Ctx<'js>, encoding: &str) -> Result<String> {
56 Encoder::from_str(encoding)
57 .and_then(|enc| enc.encode_to_string(self.0.as_ref(), true))
58 .or_throw(ctx)
59 }
60
61 fn from_array_buffer(ctx: &Ctx<'js>, buffer: ArrayBuffer<'js>) -> Result<Value<'js>> {
62 BufferPrimordials::get(ctx)?

Callers 10

allocFunction · 0.45
byte_lengthFunction · 0.45
is_encodingFunction · 0.45
get_write_parametersFunction · 0.45
test_atobFunction · 0.45
test_atob_invalid_utf8Function · 0.45
test_btoaFunction · 0.45
test_subarrayFunction · 0.45
test_subarray_partialFunction · 0.45

Calls 3

or_throwMethod · 0.80
encode_to_stringMethod · 0.80
as_refMethod · 0.80

Tested by 6

test_atobFunction · 0.36
test_atob_invalid_utf8Function · 0.36
test_btoaFunction · 0.36
test_subarrayFunction · 0.36
test_subarray_partialFunction · 0.36