Skip to main content

web_sys/features/
gen_FetchReadableStreamReadDataDone.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 = "FetchReadableStreamReadDataDone"
10    )]
11    #[derive(Debug, Clone, PartialEq, Eq)]
12    #[doc = "The `FetchReadableStreamReadDataDone` dictionary."]
13    #[doc = ""]
14    #[doc = "*This API requires the following crate features to be activated: `FetchReadableStreamReadDataDone`*"]
15    pub type FetchReadableStreamReadDataDone;
16    #[doc = "Get the `done` field of this object."]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `FetchReadableStreamReadDataDone`*"]
19    #[wasm_bindgen(method, getter = "done")]
20    pub fn get_done(this: &FetchReadableStreamReadDataDone) -> Option<bool>;
21    #[doc = "Change the `done` field of this object."]
22    #[doc = ""]
23    #[doc = "*This API requires the following crate features to be activated: `FetchReadableStreamReadDataDone`*"]
24    #[wasm_bindgen(method, setter = "done")]
25    pub fn set_done(this: &FetchReadableStreamReadDataDone, val: bool);
26}
27impl FetchReadableStreamReadDataDone {
28    #[doc = "Construct a new `FetchReadableStreamReadDataDone`."]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `FetchReadableStreamReadDataDone`*"]
31    pub fn new() -> Self {
32        #[allow(unused_mut)]
33        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
34        ret
35    }
36    #[deprecated = "Use `set_done()` instead."]
37    pub fn done(&mut self, val: bool) -> &mut Self {
38        self.set_done(val);
39        self
40    }
41}
42impl Default for FetchReadableStreamReadDataDone {
43    fn default() -> Self {
44        Self::new()
45    }
46}