bytes_from_chunk_jsval

Function bytes_from_chunk_jsval 

Source
pub(crate) fn bytes_from_chunk_jsval(
    cx: JSContext,
    chunk: &RootedTraceableBox<Heap<JSVal>>,
    can_gc: CanGc,
) -> Result<Vec<u8>, Error>
Expand description

Convert a raw stream chunk JS value to Vec<u8>. This mirrors the conversion used inside get_read_promise_bytes, but operates on the raw chunk (no { value, done } wrapper).