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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
16    pub type VideoFrameCopyToOptions;
17    #[cfg(web_sys_unstable_apis)]
18    #[doc = "Get the `layout` 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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
24    #[wasm_bindgen(method, getter = "layout")]
25    pub fn get_layout(this: &VideoFrameCopyToOptions) -> Option<::js_sys::Array>;
26    #[cfg(web_sys_unstable_apis)]
27    #[doc = "Change the `layout` 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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
33    #[wasm_bindgen(method, setter = "layout")]
34    pub fn set_layout(this: &VideoFrameCopyToOptions, val: &::wasm_bindgen::JsValue);
35    #[cfg(web_sys_unstable_apis)]
36    #[cfg(feature = "DomRectInit")]
37    #[doc = "Get the `rect` field of this object."]
38    #[doc = ""]
39    #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameCopyToOptions`*"]
40    #[doc = ""]
41    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
42    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
43    #[wasm_bindgen(method, getter = "rect")]
44    pub fn get_rect(this: &VideoFrameCopyToOptions) -> Option<DomRectInit>;
45    #[cfg(web_sys_unstable_apis)]
46    #[cfg(feature = "DomRectInit")]
47    #[doc = "Change the `rect` field of this object."]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameCopyToOptions`*"]
50    #[doc = ""]
51    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
52    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
53    #[wasm_bindgen(method, setter = "rect")]
54    pub fn set_rect(this: &VideoFrameCopyToOptions, val: &DomRectInit);
55}
56#[cfg(web_sys_unstable_apis)]
57impl VideoFrameCopyToOptions {
58    #[doc = "Construct a new `VideoFrameCopyToOptions`."]
59    #[doc = ""]
60    #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"]
61    #[doc = ""]
62    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
63    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
64    pub fn new() -> Self {
65        #[allow(unused_mut)]
66        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
67        ret
68    }
69    #[cfg(web_sys_unstable_apis)]
70    #[deprecated = "Use `set_layout()` instead."]
71    pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
72        self.set_layout(val);
73        self
74    }
75    #[cfg(web_sys_unstable_apis)]
76    #[cfg(feature = "DomRectInit")]
77    #[deprecated = "Use `set_rect()` instead."]
78    pub fn rect(&mut self, val: &DomRectInit) -> &mut Self {
79        self.set_rect(val);
80        self
81    }
82}
83#[cfg(web_sys_unstable_apis)]
84impl Default for VideoFrameCopyToOptions {
85    fn default() -> Self {
86        Self::new()
87    }
88}