web_sys/features/
gen_DateTimeValue.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 = DateTimeValue)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `DateTimeValue` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"]
12 pub type DateTimeValue;
13 #[doc = "Get the `day` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"]
16 #[wasm_bindgen(method, getter = "day")]
17 pub fn get_day(this: &DateTimeValue) -> Option<i32>;
18 #[doc = "Change the `day` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"]
21 #[wasm_bindgen(method, setter = "day")]
22 pub fn set_day(this: &DateTimeValue, val: i32);
23 #[doc = "Get the `hour` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"]
26 #[wasm_bindgen(method, getter = "hour")]
27 pub fn get_hour(this: &DateTimeValue) -> Option<i32>;
28 #[doc = "Change the `hour` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"]
31 #[wasm_bindgen(method, setter = "hour")]
32 pub fn set_hour(this: &DateTimeValue, val: i32);
33 #[doc = "Get the `minute` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"]
36 #[wasm_bindgen(method, getter = "minute")]
37 pub fn get_minute(this: &DateTimeValue) -> Option<i32>;
38 #[doc = "Change the `minute` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"]
41 #[wasm_bindgen(method, setter = "minute")]
42 pub fn set_minute(this: &DateTimeValue, val: i32);
43 #[doc = "Get the `month` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"]
46 #[wasm_bindgen(method, getter = "month")]
47 pub fn get_month(this: &DateTimeValue) -> Option<i32>;
48 #[doc = "Change the `month` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"]
51 #[wasm_bindgen(method, setter = "month")]
52 pub fn set_month(this: &DateTimeValue, val: i32);
53 #[doc = "Get the `year` field of this object."]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"]
56 #[wasm_bindgen(method, getter = "year")]
57 pub fn get_year(this: &DateTimeValue) -> Option<i32>;
58 #[doc = "Change the `year` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"]
61 #[wasm_bindgen(method, setter = "year")]
62 pub fn set_year(this: &DateTimeValue, val: i32);
63}
64impl DateTimeValue {
65 #[doc = "Construct a new `DateTimeValue`."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"]
68 pub fn new() -> Self {
69 #[allow(unused_mut)]
70 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
71 ret
72 }
73 #[deprecated = "Use `set_day()` instead."]
74 pub fn day(&mut self, val: i32) -> &mut Self {
75 self.set_day(val);
76 self
77 }
78 #[deprecated = "Use `set_hour()` instead."]
79 pub fn hour(&mut self, val: i32) -> &mut Self {
80 self.set_hour(val);
81 self
82 }
83 #[deprecated = "Use `set_minute()` instead."]
84 pub fn minute(&mut self, val: i32) -> &mut Self {
85 self.set_minute(val);
86 self
87 }
88 #[deprecated = "Use `set_month()` instead."]
89 pub fn month(&mut self, val: i32) -> &mut Self {
90 self.set_month(val);
91 self
92 }
93 #[deprecated = "Use `set_year()` instead."]
94 pub fn year(&mut self, val: i32) -> &mut Self {
95 self.set_year(val);
96 self
97 }
98}
99impl Default for DateTimeValue {
100 fn default() -> Self {
101 Self::new()
102 }
103}