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