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

Method make_string

modules/llrt_string_decoder/src/string_decoder.rs:19–23  ·  view source on GitHub ↗
(&self, ctx: &Ctx<'_>, data: &[u8])

Source from the content-addressed store, hash-verified

17
18impl StringDecoder {
19 fn make_string(&self, ctx: &Ctx<'_>, data: &[u8]) -> Result<String> {
20 self.encoder
21 .encode_to_string(data, true)
22 .map_err(|_| Exception::throw_internal(ctx, "Encoding error"))
23 }
24
25 /// Try to decode the given buffer and store the incomplete bytes.
26 /// The logic was adapted from the [Node implementation].

Callers 2

decode_dataMethod · 0.80
flushMethod · 0.80

Calls 1

encode_to_stringMethod · 0.80

Tested by

no test coverage detected