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 = ReadableByteStreamController , typescript_type = "ReadableByteStreamController" )] |
8 | #[derive (Debug, Clone, PartialEq, Eq)] |
9 | #[doc = "The `ReadableByteStreamController` class." ] |
10 | #[doc = "" ] |
11 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableByteStreamController)" ] |
12 | #[doc = "" ] |
13 | #[doc = "*This API requires the following crate features to be activated: `ReadableByteStreamController`*" ] |
14 | pub type ReadableByteStreamController; |
15 | #[cfg (feature = "ReadableStreamByobRequest" )] |
16 | # [wasm_bindgen (structural , method , getter , js_class = "ReadableByteStreamController" , js_name = byobRequest)] |
17 | #[doc = "Getter for the `byobRequest` field of this object." ] |
18 | #[doc = "" ] |
19 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableByteStreamController/byobRequest)" ] |
20 | #[doc = "" ] |
21 | #[doc = "*This API requires the following crate features to be activated: `ReadableByteStreamController`, `ReadableStreamByobRequest`*" ] |
22 | pub fn byob_request(this: &ReadableByteStreamController) -> Option<ReadableStreamByobRequest>; |
23 | # [wasm_bindgen (structural , method , getter , js_class = "ReadableByteStreamController" , js_name = desiredSize)] |
24 | #[doc = "Getter for the `desiredSize` field of this object." ] |
25 | #[doc = "" ] |
26 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableByteStreamController/desiredSize)" ] |
27 | #[doc = "" ] |
28 | #[doc = "*This API requires the following crate features to be activated: `ReadableByteStreamController`*" ] |
29 | pub fn desired_size(this: &ReadableByteStreamController) -> Option<f64>; |
30 | # [wasm_bindgen (catch , method , structural , js_class = "ReadableByteStreamController" , js_name = close)] |
31 | #[doc = "The `close()` method." ] |
32 | #[doc = "" ] |
33 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableByteStreamController/close)" ] |
34 | #[doc = "" ] |
35 | #[doc = "*This API requires the following crate features to be activated: `ReadableByteStreamController`*" ] |
36 | pub fn close(this: &ReadableByteStreamController) -> Result<(), JsValue>; |
37 | # [wasm_bindgen (catch , method , structural , js_class = "ReadableByteStreamController" , js_name = enqueue)] |
38 | #[doc = "The `enqueue()` method." ] |
39 | #[doc = "" ] |
40 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableByteStreamController/enqueue)" ] |
41 | #[doc = "" ] |
42 | #[doc = "*This API requires the following crate features to be activated: `ReadableByteStreamController`*" ] |
43 | pub fn enqueue_with_array_buffer_view( |
44 | this: &ReadableByteStreamController, |
45 | chunk: &::js_sys::Object, |
46 | ) -> Result<(), JsValue>; |
47 | # [wasm_bindgen (catch , method , structural , js_class = "ReadableByteStreamController" , js_name = enqueue)] |
48 | #[doc = "The `enqueue()` method." ] |
49 | #[doc = "" ] |
50 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableByteStreamController/enqueue)" ] |
51 | #[doc = "" ] |
52 | #[doc = "*This API requires the following crate features to be activated: `ReadableByteStreamController`*" ] |
53 | pub fn enqueue_with_u8_array( |
54 | this: &ReadableByteStreamController, |
55 | chunk: &mut [u8], |
56 | ) -> Result<(), JsValue>; |
57 | # [wasm_bindgen (method , structural , js_class = "ReadableByteStreamController" , js_name = error)] |
58 | #[doc = "The `error()` method." ] |
59 | #[doc = "" ] |
60 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableByteStreamController/error)" ] |
61 | #[doc = "" ] |
62 | #[doc = "*This API requires the following crate features to be activated: `ReadableByteStreamController`*" ] |
63 | pub fn error(this: &ReadableByteStreamController); |
64 | # [wasm_bindgen (method , structural , js_class = "ReadableByteStreamController" , js_name = error)] |
65 | #[doc = "The `error()` method." ] |
66 | #[doc = "" ] |
67 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableByteStreamController/error)" ] |
68 | #[doc = "" ] |
69 | #[doc = "*This API requires the following crate features to be activated: `ReadableByteStreamController`*" ] |
70 | pub fn error_with_e(this: &ReadableByteStreamController, e: &::wasm_bindgen::JsValue); |
71 | } |
72 | |