web_sys/features/
gen_CheckerboardReport.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 = CheckerboardReport)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `CheckerboardReport` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"]
12 pub type CheckerboardReport;
13 #[doc = "Get the `log` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"]
16 #[wasm_bindgen(method, getter = "log")]
17 pub fn get_log(this: &CheckerboardReport) -> Option<::alloc::string::String>;
18 #[doc = "Change the `log` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"]
21 #[wasm_bindgen(method, setter = "log")]
22 pub fn set_log(this: &CheckerboardReport, val: &str);
23 #[cfg(feature = "CheckerboardReason")]
24 #[doc = "Get the `reason` field of this object."]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `CheckerboardReason`, `CheckerboardReport`*"]
27 #[wasm_bindgen(method, getter = "reason")]
28 pub fn get_reason(this: &CheckerboardReport) -> Option<CheckerboardReason>;
29 #[cfg(feature = "CheckerboardReason")]
30 #[doc = "Change the `reason` field of this object."]
31 #[doc = ""]
32 #[doc = "*This API requires the following crate features to be activated: `CheckerboardReason`, `CheckerboardReport`*"]
33 #[wasm_bindgen(method, setter = "reason")]
34 pub fn set_reason(this: &CheckerboardReport, val: CheckerboardReason);
35 #[doc = "Get the `severity` field of this object."]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"]
38 #[wasm_bindgen(method, getter = "severity")]
39 pub fn get_severity(this: &CheckerboardReport) -> Option<u32>;
40 #[doc = "Change the `severity` field of this object."]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"]
43 #[wasm_bindgen(method, setter = "severity")]
44 pub fn set_severity(this: &CheckerboardReport, val: u32);
45 #[doc = "Get the `timestamp` field of this object."]
46 #[doc = ""]
47 #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"]
48 #[wasm_bindgen(method, getter = "timestamp")]
49 pub fn get_timestamp(this: &CheckerboardReport) -> Option<f64>;
50 #[doc = "Change the `timestamp` field of this object."]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"]
53 #[wasm_bindgen(method, setter = "timestamp")]
54 pub fn set_timestamp(this: &CheckerboardReport, val: f64);
55 #[doc = "Change the `timestamp` field of this object."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"]
58 #[wasm_bindgen(method, setter = "timestamp")]
59 pub fn set_timestamp_u32(this: &CheckerboardReport, val: u32);
60 #[doc = "Change the `timestamp` field of this object."]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"]
63 #[wasm_bindgen(method, setter = "timestamp")]
64 pub fn set_timestamp_f64(this: &CheckerboardReport, val: f64);
65}
66impl CheckerboardReport {
67 #[doc = "Construct a new `CheckerboardReport`."]
68 #[doc = ""]
69 #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"]
70 pub fn new() -> Self {
71 #[allow(unused_mut)]
72 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
73 ret
74 }
75 #[deprecated = "Use `set_log()` instead."]
76 pub fn log(&mut self, val: &str) -> &mut Self {
77 self.set_log(val);
78 self
79 }
80 #[cfg(feature = "CheckerboardReason")]
81 #[deprecated = "Use `set_reason()` instead."]
82 pub fn reason(&mut self, val: CheckerboardReason) -> &mut Self {
83 self.set_reason(val);
84 self
85 }
86 #[deprecated = "Use `set_severity()` instead."]
87 pub fn severity(&mut self, val: u32) -> &mut Self {
88 self.set_severity(val);
89 self
90 }
91 #[deprecated = "Use `set_timestamp()` instead."]
92 pub fn timestamp(&mut self, val: f64) -> &mut Self {
93 self.set_timestamp(val);
94 self
95 }
96}
97impl Default for CheckerboardReport {
98 fn default() -> Self {
99 Self::new()
100 }
101}