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 = ReadableStreamGetReaderOptions)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `ReadableStreamGetReaderOptions` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `ReadableStreamGetReaderOptions`*"]
12 pub type ReadableStreamGetReaderOptions;
13}
14impl ReadableStreamGetReaderOptions {
15 #[doc = "Construct a new `ReadableStreamGetReaderOptions`."]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `ReadableStreamGetReaderOptions`*"]
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 #[cfg(feature = "ReadableStreamReaderMode")]
24 #[doc = "Change the `mode` field of this object."]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `ReadableStreamGetReaderOptions`, `ReadableStreamReaderMode`*"]
27 pub fn mode(&mut self, val: ReadableStreamReaderMode) -> &mut Self {
28 use wasm_bindgen::JsValue;
29 let r: Result = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("mode"), &JsValue::from(val));
30 debug_assert!(
31 r.is_ok(),
32 "setting properties should never fail on our dictionary objects"
33 );
34 let _ = r;
35 self
36 }
37}
38impl Default for ReadableStreamGetReaderOptions {
39 fn default() -> Self {
40 Self::new()
41 }
42}
43