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

Method bytes

modules/llrt_buffer/src/blob.rs:117–121  ·  view source on GitHub ↗
(&self, ctx: Ctx<'js>)

Source from the content-addressed store, hash-verified

115 String::from_utf8_lossy(self.as_bytes()).to_string()
116 }
117
118 #[qjs(rename = "arrayBuffer")]
119 pub async fn array_buffer(&self, ctx: Ctx<'js>) -> Result<ArrayBuffer<'js>> {
120 //should be mutable according to spec, thus copy is required
121 ArrayBuffer::new_copy(ctx, self.as_bytes())
122 }
123
124 pub async fn bytes(&self, ctx: Ctx<'js>) -> Result<Value<'js>> {

Callers 4

fetch.test.tsFile · 0.45
buffer.test.tsFile · 0.45

Calls 2

as_bytesMethod · 0.45
into_valueMethod · 0.45

Tested by

no test coverage detected