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

Function source_pull_algorithm

modules/llrt_stream_web/src/transform/stream.rs:310–326  ·  view source on GitHub ↗
(
    ctx: Ctx<'js>,
    stream_class: &TransformStreamClass<'js>,
)

Source from the content-addressed store, hash-verified

308 ctx.clone(),
309 cancel_promise,
310 move |ctx, result| {
311 cc.borrow_mut().clear_algorithms();
312 match result {
313 Ok(_) => Ok(Value::new_undefined(ctx)),
314 Err(r) => Err(ctx.throw(r)),
315 }
316 },
317 )
318}
319
320// --- Source algorithms ---
321
322pub(crate) fn source_pull_algorithm<'js>(
323 ctx: Ctx<'js>,
324 stream_class: &TransformStreamClass<'js>,
325) -> Result<Promise<'js>> {
326 controller::transform_stream_set_backpressure(&ctx, stream_class, false)
327}
328
329pub(crate) fn source_cancel_algorithm<'js>(

Callers 1

callMethod · 0.85

Calls 2

resolve_undefinedMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected