web_sys/features/
gen_BlobPropertyBag.rs

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 = BlobPropertyBag)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `BlobPropertyBag` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`*"]
12    pub type BlobPropertyBag;
13    #[cfg(feature = "EndingTypes")]
14    #[doc = "Get the `endings` field of this object."]
15    #[doc = ""]
16    #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`, `EndingTypes`*"]
17    #[wasm_bindgen(method, getter = "endings")]
18    pub fn get_endings(this: &BlobPropertyBag) -> Option<EndingTypes>;
19    #[cfg(feature = "EndingTypes")]
20    #[doc = "Change the `endings` field of this object."]
21    #[doc = ""]
22    #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`, `EndingTypes`*"]
23    #[wasm_bindgen(method, setter = "endings")]
24    pub fn set_endings(this: &BlobPropertyBag, val: EndingTypes);
25    #[doc = "Get the `type` field of this object."]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`*"]
28    #[wasm_bindgen(method, getter = "type")]
29    pub fn get_type(this: &BlobPropertyBag) -> Option<::alloc::string::String>;
30    #[doc = "Change the `type` field of this object."]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`*"]
33    #[wasm_bindgen(method, setter = "type")]
34    pub fn set_type(this: &BlobPropertyBag, val: &str);
35}
36impl BlobPropertyBag {
37    #[doc = "Construct a new `BlobPropertyBag`."]
38    #[doc = ""]
39    #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`*"]
40    pub fn new() -> Self {
41        #[allow(unused_mut)]
42        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
43        ret
44    }
45    #[cfg(feature = "EndingTypes")]
46    #[deprecated = "Use `set_endings()` instead."]
47    pub fn endings(&mut self, val: EndingTypes) -> &mut Self {
48        self.set_endings(val);
49        self
50    }
51    #[deprecated = "Use `set_type()` instead."]
52    pub fn type_(&mut self, val: &str) -> &mut Self {
53        self.set_type(val);
54        self
55    }
56}
57impl Default for BlobPropertyBag {
58    fn default() -> Self {
59        Self::new()
60    }
61}