web_sys/features/
gen_AudioSinkOptions.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 = AudioSinkOptions)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `AudioSinkOptions` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `AudioSinkOptions`*"]
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 AudioSinkOptions;
17 #[cfg(web_sys_unstable_apis)]
18 #[cfg(feature = "AudioSinkType")]
19 #[doc = "Get the `type` field of this object."]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `AudioSinkOptions`, `AudioSinkType`*"]
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 = "type")]
26 pub fn get_type(this: &AudioSinkOptions) -> AudioSinkType;
27 #[cfg(web_sys_unstable_apis)]
28 #[cfg(feature = "AudioSinkType")]
29 #[doc = "Change the `type` field of this object."]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `AudioSinkOptions`, `AudioSinkType`*"]
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 = "type")]
36 pub fn set_type(this: &AudioSinkOptions, val: AudioSinkType);
37}
38#[cfg(web_sys_unstable_apis)]
39impl AudioSinkOptions {
40 #[cfg(feature = "AudioSinkType")]
41 #[doc = "Construct a new `AudioSinkOptions`."]
42 #[doc = ""]
43 #[doc = "*This API requires the following crate features to be activated: `AudioSinkOptions`, `AudioSinkType`*"]
44 #[doc = ""]
45 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
46 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
47 pub fn new(type_: AudioSinkType) -> Self {
48 #[allow(unused_mut)]
49 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
50 ret.set_type(type_);
51 ret
52 }
53 #[cfg(web_sys_unstable_apis)]
54 #[cfg(feature = "AudioSinkType")]
55 #[deprecated = "Use `set_type()` instead."]
56 pub fn type_(&mut self, val: AudioSinkType) -> &mut Self {
57 self.set_type(val);
58 self
59 }
60}