web_sys/features/
gen_VideoFrameCopyToOptions.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = VideoFrameCopyToOptions)]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `VideoFrameCopyToOptions` dictionary."]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"]
13    #[doc = ""]
14    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
16    pub type VideoFrameCopyToOptions;
17    #[cfg(web_sys_unstable_apis)]
18    #[doc = "Get the `colorSpace` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"]
21    #[doc = ""]
22    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
24    #[wasm_bindgen(method, getter = "colorSpace")]
25    pub fn get_color_space(this: &VideoFrameCopyToOptions) -> Option<::alloc::string::String>;
26    #[cfg(web_sys_unstable_apis)]
27    #[doc = "Change the `colorSpace` field of this object."]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"]
30    #[doc = ""]
31    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
32    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
33    #[wasm_bindgen(method, setter = "colorSpace")]
34    pub fn set_color_space(this: &VideoFrameCopyToOptions, val: &str);
35    #[cfg(web_sys_unstable_apis)]
36    #[doc = "Get the `format` field of this object."]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"]
39    #[doc = ""]
40    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
41    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
42    #[wasm_bindgen(method, getter = "format")]
43    pub fn get_format(this: &VideoFrameCopyToOptions) -> Option<::alloc::string::String>;
44    #[cfg(web_sys_unstable_apis)]
45    #[doc = "Change the `format` field of this object."]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"]
48    #[doc = ""]
49    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
51    #[wasm_bindgen(method, setter = "format")]
52    pub fn set_format(this: &VideoFrameCopyToOptions, val: &str);
53    #[cfg(web_sys_unstable_apis)]
54    #[doc = "Get the `layout` field of this object."]
55    #[doc = ""]
56    #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"]
57    #[doc = ""]
58    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
59    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
60    #[wasm_bindgen(method, getter = "layout")]
61    pub fn get_layout(this: &VideoFrameCopyToOptions) -> Option<::js_sys::Array>;
62    #[cfg(web_sys_unstable_apis)]
63    #[doc = "Change the `layout` field of this object."]
64    #[doc = ""]
65    #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"]
66    #[doc = ""]
67    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
68    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
69    #[wasm_bindgen(method, setter = "layout")]
70    pub fn set_layout(this: &VideoFrameCopyToOptions, val: &::wasm_bindgen::JsValue);
71    #[cfg(web_sys_unstable_apis)]
72    #[cfg(feature = "DomRectInit")]
73    #[doc = "Get the `rect` field of this object."]
74    #[doc = ""]
75    #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameCopyToOptions`*"]
76    #[doc = ""]
77    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
78    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
79    #[wasm_bindgen(method, getter = "rect")]
80    pub fn get_rect(this: &VideoFrameCopyToOptions) -> Option<DomRectInit>;
81    #[cfg(web_sys_unstable_apis)]
82    #[cfg(feature = "DomRectInit")]
83    #[doc = "Change the `rect` field of this object."]
84    #[doc = ""]
85    #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameCopyToOptions`*"]
86    #[doc = ""]
87    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
88    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
89    #[wasm_bindgen(method, setter = "rect")]
90    pub fn set_rect(this: &VideoFrameCopyToOptions, val: &DomRectInit);
91}
92#[cfg(web_sys_unstable_apis)]
93impl VideoFrameCopyToOptions {
94    #[doc = "Construct a new `VideoFrameCopyToOptions`."]
95    #[doc = ""]
96    #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"]
97    #[doc = ""]
98    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
99    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
100    pub fn new() -> Self {
101        #[allow(unused_mut)]
102        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
103        ret
104    }
105    #[cfg(web_sys_unstable_apis)]
106    #[deprecated = "Use `set_color_space()` instead."]
107    pub fn color_space(&mut self, val: &str) -> &mut Self {
108        self.set_color_space(val);
109        self
110    }
111    #[cfg(web_sys_unstable_apis)]
112    #[deprecated = "Use `set_format()` instead."]
113    pub fn format(&mut self, val: &str) -> &mut Self {
114        self.set_format(val);
115        self
116    }
117    #[cfg(web_sys_unstable_apis)]
118    #[deprecated = "Use `set_layout()` instead."]
119    pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
120        self.set_layout(val);
121        self
122    }
123    #[cfg(web_sys_unstable_apis)]
124    #[cfg(feature = "DomRectInit")]
125    #[deprecated = "Use `set_rect()` instead."]
126    pub fn rect(&mut self, val: &DomRectInit) -> &mut Self {
127        self.set_rect(val);
128        self
129    }
130}
131#[cfg(web_sys_unstable_apis)]
132impl Default for VideoFrameCopyToOptions {
133    fn default() -> Self {
134        Self::new()
135    }
136}