Function mozjs::jsapi::ReadableStreamClose

source ยท
pub unsafe extern "C" fn ReadableStreamClose(
    cx: *mut JSContext,
    stream: Handle<*mut JSObject>,
) -> bool
Expand description

Close the given ReadableStream. This is equivalent to controller.close() in JS.

This can fail with or without an exception pending under a variety of circumstances. On failure, the stream may or may not be closed, and downstream consumers may or may not have been notified.

Asserts that |stream| is a ReadableStream object or an unwrappable wrapper for one.