Skip to main content

web_sys/features/
gen_ReadableStreamByobRequest.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "::js_sys::Object",
9        js_name = "ReadableStreamBYOBRequest",
10        typescript_type = "ReadableStreamBYOBRequest"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `ReadableStreamByobRequest` class."]
14    #[doc = ""]
15    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBRequest)"]
16    #[doc = ""]
17    #[doc = "*This API requires the following crate features to be activated: `ReadableStreamByobRequest`*"]
18    pub type ReadableStreamByobRequest;
19    #[wasm_bindgen(
20        method,
21        getter,
22        js_class = "ReadableStreamBYOBRequest",
23        js_name = "view"
24    )]
25    #[doc = "Getter for the `view` field of this object."]
26    #[doc = ""]
27    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBRequest/view)"]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `ReadableStreamByobRequest`*"]
30    pub fn view(this: &ReadableStreamByobRequest) -> Option<::js_sys::Object>;
31    #[wasm_bindgen(
32        catch,
33        method,
34        js_class = "ReadableStreamBYOBRequest",
35        js_name = "respond"
36    )]
37    #[doc = "The `respond()` method."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBRequest/respond)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `ReadableStreamByobRequest`*"]
42    pub fn respond_with_u32(
43        this: &ReadableStreamByobRequest,
44        bytes_written: u32,
45    ) -> Result<(), JsValue>;
46    #[wasm_bindgen(
47        catch,
48        method,
49        js_class = "ReadableStreamBYOBRequest",
50        js_name = "respond"
51    )]
52    #[doc = "The `respond()` method."]
53    #[doc = ""]
54    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBRequest/respond)"]
55    #[doc = ""]
56    #[doc = "*This API requires the following crate features to be activated: `ReadableStreamByobRequest`*"]
57    pub fn respond_with_f64(
58        this: &ReadableStreamByobRequest,
59        bytes_written: f64,
60    ) -> Result<(), JsValue>;
61    #[wasm_bindgen(
62        catch,
63        method,
64        js_class = "ReadableStreamBYOBRequest",
65        js_name = "respondWithNewView"
66    )]
67    #[doc = "The `respondWithNewView()` method."]
68    #[doc = ""]
69    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView)"]
70    #[doc = ""]
71    #[doc = "*This API requires the following crate features to be activated: `ReadableStreamByobRequest`*"]
72    pub fn respond_with_new_view_with_array_buffer_view(
73        this: &ReadableStreamByobRequest,
74        view: &::js_sys::Object,
75    ) -> Result<(), JsValue>;
76    #[wasm_bindgen(
77        catch,
78        method,
79        js_class = "ReadableStreamBYOBRequest",
80        js_name = "respondWithNewView"
81    )]
82    #[doc = "The `respondWithNewView()` method."]
83    #[doc = ""]
84    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView)"]
85    #[doc = ""]
86    #[doc = "*This API requires the following crate features to be activated: `ReadableStreamByobRequest`*"]
87    pub fn respond_with_new_view_with_u8_array(
88        this: &ReadableStreamByobRequest,
89        view: &mut [u8],
90    ) -> Result<(), JsValue>;
91    #[wasm_bindgen(
92        catch,
93        method,
94        js_class = "ReadableStreamBYOBRequest",
95        js_name = "respondWithNewView"
96    )]
97    #[doc = "The `respondWithNewView()` method."]
98    #[doc = ""]
99    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView)"]
100    #[doc = ""]
101    #[doc = "*This API requires the following crate features to be activated: `ReadableStreamByobRequest`*"]
102    pub fn respond_with_new_view_with_js_u8_array(
103        this: &ReadableStreamByobRequest,
104        view: &::js_sys::Uint8Array,
105    ) -> Result<(), JsValue>;
106}