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}
56impl CheckerboardReport {
57 #[doc = "Construct a new `CheckerboardReport`."]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"]
60 pub fn new() -> Self {
61 #[allow(unused_mut)]
62 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
63 ret
64 }
65 #[deprecated = "Use `set_log()` instead."]
66 pub fn log(&mut self, val: &str) -> &mut Self {
67 self.set_log(val);
68 self
69 }
70 #[cfg(feature = "CheckerboardReason")]
71 #[deprecated = "Use `set_reason()` instead."]
72 pub fn reason(&mut self, val: CheckerboardReason) -> &mut Self {
73 self.set_reason(val);
74 self
75 }
76 #[deprecated = "Use `set_severity()` instead."]
77 pub fn severity(&mut self, val: u32) -> &mut Self {
78 self.set_severity(val);
79 self
80 }
81 #[deprecated = "Use `set_timestamp()` instead."]
82 pub fn timestamp(&mut self, val: f64) -> &mut Self {
83 self.set_timestamp(val);
84 self
85 }
86}
87impl Default for CheckerboardReport {
88 fn default() -> Self {
89 Self::new()
90 }
91}