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