web_sys/features/
gen_ConsoleInstanceOptions.rs1#![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 = ConsoleInstanceOptions)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `ConsoleInstanceOptions` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"]
12 pub type ConsoleInstanceOptions;
13 #[doc = "Get the `consoleID` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"]
16 #[wasm_bindgen(method, getter = "consoleID")]
17 pub fn get_console_id(this: &ConsoleInstanceOptions) -> Option<::alloc::string::String>;
18 #[doc = "Change the `consoleID` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"]
21 #[wasm_bindgen(method, setter = "consoleID")]
22 pub fn set_console_id(this: &ConsoleInstanceOptions, val: &str);
23 #[doc = "Get the `dump` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"]
26 #[wasm_bindgen(method, getter = "dump")]
27 pub fn get_dump(this: &ConsoleInstanceOptions) -> Option<::js_sys::Function>;
28 #[doc = "Change the `dump` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"]
31 #[wasm_bindgen(method, setter = "dump")]
32 pub fn set_dump(this: &ConsoleInstanceOptions, val: &::js_sys::Function);
33 #[doc = "Get the `innerID` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"]
36 #[wasm_bindgen(method, getter = "innerID")]
37 pub fn get_inner_id(this: &ConsoleInstanceOptions) -> Option<::alloc::string::String>;
38 #[doc = "Change the `innerID` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"]
41 #[wasm_bindgen(method, setter = "innerID")]
42 pub fn set_inner_id(this: &ConsoleInstanceOptions, val: &str);
43 #[cfg(feature = "ConsoleLogLevel")]
44 #[doc = "Get the `maxLogLevel` field of this object."]
45 #[doc = ""]
46 #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`, `ConsoleLogLevel`*"]
47 #[wasm_bindgen(method, getter = "maxLogLevel")]
48 pub fn get_max_log_level(this: &ConsoleInstanceOptions) -> Option<ConsoleLogLevel>;
49 #[cfg(feature = "ConsoleLogLevel")]
50 #[doc = "Change the `maxLogLevel` field of this object."]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`, `ConsoleLogLevel`*"]
53 #[wasm_bindgen(method, setter = "maxLogLevel")]
54 pub fn set_max_log_level(this: &ConsoleInstanceOptions, val: ConsoleLogLevel);
55 #[doc = "Get the `maxLogLevelPref` field of this object."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"]
58 #[wasm_bindgen(method, getter = "maxLogLevelPref")]
59 pub fn get_max_log_level_pref(this: &ConsoleInstanceOptions)
60 -> Option<::alloc::string::String>;
61 #[doc = "Change the `maxLogLevelPref` field of this object."]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"]
64 #[wasm_bindgen(method, setter = "maxLogLevelPref")]
65 pub fn set_max_log_level_pref(this: &ConsoleInstanceOptions, val: &str);
66 #[doc = "Get the `prefix` field of this object."]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"]
69 #[wasm_bindgen(method, getter = "prefix")]
70 pub fn get_prefix(this: &ConsoleInstanceOptions) -> Option<::alloc::string::String>;
71 #[doc = "Change the `prefix` field of this object."]
72 #[doc = ""]
73 #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"]
74 #[wasm_bindgen(method, setter = "prefix")]
75 pub fn set_prefix(this: &ConsoleInstanceOptions, val: &str);
76}
77impl ConsoleInstanceOptions {
78 #[doc = "Construct a new `ConsoleInstanceOptions`."]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"]
81 pub fn new() -> Self {
82 #[allow(unused_mut)]
83 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
84 ret
85 }
86 #[deprecated = "Use `set_console_id()` instead."]
87 pub fn console_id(&mut self, val: &str) -> &mut Self {
88 self.set_console_id(val);
89 self
90 }
91 #[deprecated = "Use `set_dump()` instead."]
92 pub fn dump(&mut self, val: &::js_sys::Function) -> &mut Self {
93 self.set_dump(val);
94 self
95 }
96 #[deprecated = "Use `set_inner_id()` instead."]
97 pub fn inner_id(&mut self, val: &str) -> &mut Self {
98 self.set_inner_id(val);
99 self
100 }
101 #[cfg(feature = "ConsoleLogLevel")]
102 #[deprecated = "Use `set_max_log_level()` instead."]
103 pub fn max_log_level(&mut self, val: ConsoleLogLevel) -> &mut Self {
104 self.set_max_log_level(val);
105 self
106 }
107 #[deprecated = "Use `set_max_log_level_pref()` instead."]
108 pub fn max_log_level_pref(&mut self, val: &str) -> &mut Self {
109 self.set_max_log_level_pref(val);
110 self
111 }
112 #[deprecated = "Use `set_prefix()` instead."]
113 pub fn prefix(&mut self, val: &str) -> &mut Self {
114 self.set_prefix(val);
115 self
116 }
117}
118impl Default for ConsoleInstanceOptions {
119 fn default() -> Self {
120 Self::new()
121 }
122}