maxcountryman_web_sys/features/
gen_GpuImageCopyExternalImage.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[cfg(web_sys_unstable_apis)]
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = GPUImageCopyExternalImage)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `GpuImageCopyExternalImage` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"]
12 #[doc = ""]
13 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
14 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
15 pub type GpuImageCopyExternalImage;
16}
17#[cfg(web_sys_unstable_apis)]
18impl GpuImageCopyExternalImage {
19 #[doc = "Construct a new `GpuImageCopyExternalImage`."]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"]
22 #[doc = ""]
23 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
24 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
25 pub fn new(source: &::js_sys::Object) -> Self {
26 #[allow(unused_mut)]
27 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
28 ret.source(source);
29 ret
30 }
31 #[cfg(web_sys_unstable_apis)]
32 #[doc = "Change the `origin` field of this object."]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"]
35 #[doc = ""]
36 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
37 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
38 pub fn origin(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
39 use wasm_bindgen::JsValue;
40 let r =
41 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("origin"), &JsValue::from(val));
42 debug_assert!(
43 r.is_ok(),
44 "setting properties should never fail on our dictionary objects"
45 );
46 let _ = r;
47 self
48 }
49 #[cfg(web_sys_unstable_apis)]
50 #[doc = "Change the `source` field of this object."]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"]
53 #[doc = ""]
54 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
55 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
56 pub fn source(&mut self, val: &::js_sys::Object) -> &mut Self {
57 use wasm_bindgen::JsValue;
58 let r =
59 ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("source"), &JsValue::from(val));
60 debug_assert!(
61 r.is_ok(),
62 "setting properties should never fail on our dictionary objects"
63 );
64 let _ = r;
65 self
66 }
67}