web_sys/features/
gen_AudioDataCopyToOptions.rs1#![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 = AudioDataCopyToOptions)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `AudioDataCopyToOptions` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"]
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 AudioDataCopyToOptions;
17 #[cfg(web_sys_unstable_apis)]
18 #[cfg(feature = "AudioSampleFormat")]
19 #[doc = "Get the `format` field of this object."]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`, `AudioSampleFormat`*"]
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 #[wasm_bindgen(method, getter = "format")]
26 pub fn get_format(this: &AudioDataCopyToOptions) -> Option<AudioSampleFormat>;
27 #[cfg(web_sys_unstable_apis)]
28 #[cfg(feature = "AudioSampleFormat")]
29 #[doc = "Change the `format` field of this object."]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`, `AudioSampleFormat`*"]
32 #[doc = ""]
33 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
34 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
35 #[wasm_bindgen(method, setter = "format")]
36 pub fn set_format(this: &AudioDataCopyToOptions, val: AudioSampleFormat);
37 #[cfg(web_sys_unstable_apis)]
38 #[doc = "Get the `frameCount` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"]
41 #[doc = ""]
42 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
43 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
44 #[wasm_bindgen(method, getter = "frameCount")]
45 pub fn get_frame_count(this: &AudioDataCopyToOptions) -> Option<u32>;
46 #[cfg(web_sys_unstable_apis)]
47 #[doc = "Change the `frameCount` field of this object."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"]
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 = "frameCount")]
54 pub fn set_frame_count(this: &AudioDataCopyToOptions, val: u32);
55 #[cfg(web_sys_unstable_apis)]
56 #[doc = "Get the `frameOffset` field of this object."]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"]
59 #[doc = ""]
60 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
61 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
62 #[wasm_bindgen(method, getter = "frameOffset")]
63 pub fn get_frame_offset(this: &AudioDataCopyToOptions) -> Option<u32>;
64 #[cfg(web_sys_unstable_apis)]
65 #[doc = "Change the `frameOffset` field of this object."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"]
68 #[doc = ""]
69 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
70 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
71 #[wasm_bindgen(method, setter = "frameOffset")]
72 pub fn set_frame_offset(this: &AudioDataCopyToOptions, val: u32);
73 #[cfg(web_sys_unstable_apis)]
74 #[doc = "Get the `planeIndex` field of this object."]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"]
77 #[doc = ""]
78 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
79 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
80 #[wasm_bindgen(method, getter = "planeIndex")]
81 pub fn get_plane_index(this: &AudioDataCopyToOptions) -> u32;
82 #[cfg(web_sys_unstable_apis)]
83 #[doc = "Change the `planeIndex` field of this object."]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
89 #[wasm_bindgen(method, setter = "planeIndex")]
90 pub fn set_plane_index(this: &AudioDataCopyToOptions, val: u32);
91}
92#[cfg(web_sys_unstable_apis)]
93impl AudioDataCopyToOptions {
94 #[doc = "Construct a new `AudioDataCopyToOptions`."]
95 #[doc = ""]
96 #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
100 pub fn new(plane_index: u32) -> Self {
101 #[allow(unused_mut)]
102 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
103 ret.set_plane_index(plane_index);
104 ret
105 }
106 #[cfg(web_sys_unstable_apis)]
107 #[cfg(feature = "AudioSampleFormat")]
108 #[deprecated = "Use `set_format()` instead."]
109 pub fn format(&mut self, val: AudioSampleFormat) -> &mut Self {
110 self.set_format(val);
111 self
112 }
113 #[cfg(web_sys_unstable_apis)]
114 #[deprecated = "Use `set_frame_count()` instead."]
115 pub fn frame_count(&mut self, val: u32) -> &mut Self {
116 self.set_frame_count(val);
117 self
118 }
119 #[cfg(web_sys_unstable_apis)]
120 #[deprecated = "Use `set_frame_offset()` instead."]
121 pub fn frame_offset(&mut self, val: u32) -> &mut Self {
122 self.set_frame_offset(val);
123 self
124 }
125 #[cfg(web_sys_unstable_apis)]
126 #[deprecated = "Use `set_plane_index()` instead."]
127 pub fn plane_index(&mut self, val: u32) -> &mut Self {
128 self.set_plane_index(val);
129 self
130 }
131}