1 | #![allow (unused_imports)] |
2 | #![allow (clippy::all)] |
3 | use super::*; |
4 | use wasm_bindgen::prelude::*; |
5 | #[wasm_bindgen ] |
6 | extern "C" { |
7 | # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ReadableStreamBYOBReader , typescript_type = "ReadableStreamBYOBReader" )] |
8 | #[derive (Debug, Clone, PartialEq, Eq)] |
9 | #[doc = "The `ReadableStreamByobReader` class." ] |
10 | #[doc = "" ] |
11 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBReader)" ] |
12 | #[doc = "" ] |
13 | #[doc = "*This API requires the following crate features to be activated: `ReadableStreamByobReader`*" ] |
14 | pub type ReadableStreamByobReader; |
15 | # [wasm_bindgen (structural , method , getter , js_class = "ReadableStreamBYOBReader" , js_name = closed)] |
16 | #[doc = "Getter for the `closed` field of this object." ] |
17 | #[doc = "" ] |
18 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBReader/closed)" ] |
19 | #[doc = "" ] |
20 | #[doc = "*This API requires the following crate features to be activated: `ReadableStreamByobReader`*" ] |
21 | pub fn closed(this: &ReadableStreamByobReader) -> ::js_sys::Promise; |
22 | #[cfg (feature = "ReadableStream" )] |
23 | #[wasm_bindgen (catch, constructor, js_class = "ReadableStreamBYOBReader" )] |
24 | #[doc = "The `new ReadableStreamByobReader(..)` constructor, creating a new instance of `ReadableStreamByobReader`." ] |
25 | #[doc = "" ] |
26 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBReader/ReadableStreamBYOBReader)" ] |
27 | #[doc = "" ] |
28 | #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `ReadableStreamByobReader`*" ] |
29 | pub fn new(stream: &ReadableStream) -> Result<ReadableStreamByobReader, JsValue>; |
30 | # [wasm_bindgen (method , structural , js_class = "ReadableStreamBYOBReader" , js_name = read)] |
31 | #[doc = "The `read()` method." ] |
32 | #[doc = "" ] |
33 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBReader/read)" ] |
34 | #[doc = "" ] |
35 | #[doc = "*This API requires the following crate features to be activated: `ReadableStreamByobReader`*" ] |
36 | pub fn read_with_array_buffer_view( |
37 | this: &ReadableStreamByobReader, |
38 | view: &::js_sys::Object, |
39 | ) -> ::js_sys::Promise; |
40 | # [wasm_bindgen (method , structural , js_class = "ReadableStreamBYOBReader" , js_name = releaseLock)] |
41 | #[doc = "The `releaseLock()` method." ] |
42 | #[doc = "" ] |
43 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBReader/releaseLock)" ] |
44 | #[doc = "" ] |
45 | #[doc = "*This API requires the following crate features to be activated: `ReadableStreamByobReader`*" ] |
46 | pub fn release_lock(this: &ReadableStreamByobReader); |
47 | # [wasm_bindgen (method , structural , js_class = "ReadableStreamBYOBReader" , js_name = cancel)] |
48 | #[doc = "The `cancel()` method." ] |
49 | #[doc = "" ] |
50 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBReader/cancel)" ] |
51 | #[doc = "" ] |
52 | #[doc = "*This API requires the following crate features to be activated: `ReadableStreamByobReader`*" ] |
53 | pub fn cancel(this: &ReadableStreamByobReader) -> ::js_sys::Promise; |
54 | # [wasm_bindgen (method , structural , js_class = "ReadableStreamBYOBReader" , js_name = cancel)] |
55 | #[doc = "The `cancel()` method." ] |
56 | #[doc = "" ] |
57 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBReader/cancel)" ] |
58 | #[doc = "" ] |
59 | #[doc = "*This API requires the following crate features to be activated: `ReadableStreamByobReader`*" ] |
60 | pub fn cancel_with_reason( |
61 | this: &ReadableStreamByobReader, |
62 | reason: &::wasm_bindgen::JsValue, |
63 | ) -> ::js_sys::Promise; |
64 | } |
65 | |