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

Returns the embedding-provided underlying source of the given |stream|.

Can be used to optimize operations if both the underlying source and the intended sink are embedding-provided. In that case it might be preferrable to pipe data directly from source to sink without interacting with the stream at all.

Locks the stream until ReadableStreamReleaseExternalUnderlyingSource is called.

Throws an exception if the stream is locked, i.e. if a reader has been acquired for the stream, or if ReadableStreamGetExternalUnderlyingSource has been used previously without releasing the external source again.

Throws an exception if the stream isn’t readable, i.e if it is errored or closed. This is different from ReadableStreamGetReader because we don’t have a Promise to resolve/reject, which a reader provides.

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

Asserts that the stream has an embedding-provided underlying source.