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