1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ReadableStreamReadResult)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `ReadableStreamReadResult` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"]
12 pub type ReadableStreamReadResult;
13}
14impl ReadableStreamReadResult {
15 #[doc = "Construct a new `ReadableStreamReadResult`."]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"]
18 pub fn new() -> Self {
19 #[allow(unused_mut)]
20 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
21 ret
22 }
23 #[doc = "Change the `done` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"]
26 pub fn done(&mut self, val: bool) -> &mut Self {
27 use wasm_bindgen::JsValue;
28 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("done"), &JsValue::from(val));
29 debug_assert!(
30 r.is_ok(),
31 "setting properties should never fail on our dictionary objects"
32 );
33 let _ = r;
34 self
35 }
36 #[doc = "Change the `value` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"]
39 pub fn value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
40 use wasm_bindgen::JsValue;
41 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("value"), &JsValue::from(val));
42 debug_assert!(
43 r.is_ok(),
44 "setting properties should never fail on our dictionary objects"
45 );
46 let _ = r;
47 self
48 }
49}
50impl Default for ReadableStreamReadResult {
51 fn default() -> Self {
52 Self::new()
53 }
54}
55