Function mozjs::jsapi::JS::ReadableStreamCancel

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

Cancels the given ReadableStream with the given reason and returns a Promise resolved according to the result.

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