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