Function mozjs::jsapi::ReadableStreamDefaultReaderRead

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

C++ equivalent of the reader.read() method on default readers (https://streams.spec.whatwg.org/#default-reader-read).

The result is a new Promise object, or null on OOM.

reader must be the result of calling JS::ReadableStreamGetReader with ReadableStreamReaderMode::Default mode, or an unwrappable wrapper for such a reader.