web_sys/features/
gen_WriteParams.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = WriteParams)]
    #[derive(Debug, Clone, PartialEq, Eq)]
    #[doc = "The `WriteParams` dictionary."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"]
    pub type WriteParams;
    #[doc = "Get the `data` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"]
    #[wasm_bindgen(method, getter = "data")]
    pub fn get_data(this: &WriteParams) -> ::wasm_bindgen::JsValue;
    #[doc = "Change the `data` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"]
    #[wasm_bindgen(method, setter = "data")]
    pub fn set_data(this: &WriteParams, val: &::wasm_bindgen::JsValue);
    #[doc = "Get the `position` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"]
    #[wasm_bindgen(method, getter = "position")]
    pub fn get_position(this: &WriteParams) -> Option<f64>;
    #[doc = "Change the `position` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"]
    #[wasm_bindgen(method, setter = "position")]
    pub fn set_position(this: &WriteParams, val: Option<f64>);
    #[doc = "Get the `size` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"]
    #[wasm_bindgen(method, getter = "size")]
    pub fn get_size(this: &WriteParams) -> Option<f64>;
    #[doc = "Change the `size` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"]
    #[wasm_bindgen(method, setter = "size")]
    pub fn set_size(this: &WriteParams, val: Option<f64>);
    #[cfg(feature = "WriteCommandType")]
    #[doc = "Get the `type` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `WriteCommandType`, `WriteParams`*"]
    #[wasm_bindgen(method, getter = "type")]
    pub fn get_type(this: &WriteParams) -> WriteCommandType;
    #[cfg(feature = "WriteCommandType")]
    #[doc = "Change the `type` field of this object."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `WriteCommandType`, `WriteParams`*"]
    #[wasm_bindgen(method, setter = "type")]
    pub fn set_type(this: &WriteParams, val: WriteCommandType);
}
impl WriteParams {
    #[cfg(feature = "WriteCommandType")]
    #[doc = "Construct a new `WriteParams`."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `WriteCommandType`, `WriteParams`*"]
    pub fn new(type_: WriteCommandType) -> Self {
        #[allow(unused_mut)]
        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
        ret.type_(type_);
        ret
    }
    #[deprecated = "Use `set_data()` instead."]
    pub fn data(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self {
        self.set_data(val.unwrap_or(&::wasm_bindgen::JsValue::NULL));
        self
    }
    #[deprecated = "Use `set_position()` instead."]
    pub fn position(&mut self, val: Option<f64>) -> &mut Self {
        self.set_position(val);
        self
    }
    #[deprecated = "Use `set_size()` instead."]
    pub fn size(&mut self, val: Option<f64>) -> &mut Self {
        self.set_size(val);
        self
    }
    #[cfg(feature = "WriteCommandType")]
    #[deprecated = "Use `set_type()` instead."]
    pub fn type_(&mut self, val: WriteCommandType) -> &mut Self {
        self.set_type(val);
        self
    }
}