web-sys-async-io 0.5.0

An async-IO implementation read/write stream in the browser, using the web-sys types.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use js_sys::Uint8Array;
use wasm_bindgen::prelude::*;

#[wasm_bindgen]
extern "C" {
    /// A result returned by
    /// [`ReadableStreamByobReader.read`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamByobReader/read).
    #[derive(Clone, Debug)]
    pub type ReadableStreamByobReaderValue;

    #[wasm_bindgen(method, getter, js_name = done)]
    pub fn is_done(this: &ReadableStreamByobReaderValue) -> bool;

    #[wasm_bindgen(method, getter, js_name = value)]
    pub fn value(this: &ReadableStreamByobReaderValue) -> Option<Uint8Array>;
}