1 #![allow(unused_imports)]
2 use super::*;
3 use wasm_bindgen::prelude::*;
4 #[cfg(web_sys_unstable_apis)]
5 #[wasm_bindgen]
6 extern "C" {
7     # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ReadableStreamBYOBReadResult)]
8     #[derive(Debug, Clone, PartialEq, Eq)]
9     #[doc = "The `ReadableStreamByobReadResult` dictionary."]
10     #[doc = ""]
11     #[doc = "*This API requires the following crate features to be activated: `ReadableStreamByobReadResult`*"]
12     #[doc = ""]
13     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
14     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
15     pub type ReadableStreamByobReadResult;
16 }
17 #[cfg(web_sys_unstable_apis)]
18 impl ReadableStreamByobReadResult {
19     #[doc = "Construct a new `ReadableStreamByobReadResult`."]
20     #[doc = ""]
21     #[doc = "*This API requires the following crate features to be activated: `ReadableStreamByobReadResult`*"]
22     #[doc = ""]
23     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
24     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
new() -> Self25     pub fn new() -> Self {
26         #[allow(unused_mut)]
27         let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
28         ret
29     }
30     #[cfg(web_sys_unstable_apis)]
31     #[doc = "Change the `done` field of this object."]
32     #[doc = ""]
33     #[doc = "*This API requires the following crate features to be activated: `ReadableStreamByobReadResult`*"]
34     #[doc = ""]
35     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
36     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
done(&mut self, val: bool) -> &mut Self37     pub fn done(&mut self, val: bool) -> &mut Self {
38         use wasm_bindgen::JsValue;
39         let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("done"), &JsValue::from(val));
40         debug_assert!(
41             r.is_ok(),
42             "setting properties should never fail on our dictionary objects"
43         );
44         let _ = r;
45         self
46     }
47     #[cfg(web_sys_unstable_apis)]
48     #[doc = "Change the `value` field of this object."]
49     #[doc = ""]
50     #[doc = "*This API requires the following crate features to be activated: `ReadableStreamByobReadResult`*"]
51     #[doc = ""]
52     #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
53     #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
value(&mut self, val: &::js_sys::Object) -> &mut Self54     pub fn value(&mut self, val: &::js_sys::Object) -> &mut Self {
55         use wasm_bindgen::JsValue;
56         let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("value"), &JsValue::from(val));
57         debug_assert!(
58             r.is_ok(),
59             "setting properties should never fail on our dictionary objects"
60         );
61         let _ = r;
62         self
63     }
64 }
65 #[cfg(web_sys_unstable_apis)]
66 impl Default for ReadableStreamByobReadResult {
default() -> Self67     fn default() -> Self {
68         Self::new()
69     }
70 }
71