Skip to main content

web_sys/features/
gen_MediaStreamTrackGeneratorInit.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(
9        extends = "::js_sys::Object",
10        js_name = "MediaStreamTrackGeneratorInit"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `MediaStreamTrackGeneratorInit` dictionary."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackGeneratorInit`*"]
16    #[doc = ""]
17    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
18    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
19    pub type MediaStreamTrackGeneratorInit;
20    #[cfg(web_sys_unstable_apis)]
21    #[doc = "Get the `kind` field of this object."]
22    #[doc = ""]
23    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackGeneratorInit`*"]
24    #[doc = ""]
25    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
26    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
27    #[wasm_bindgen(method, getter = "kind")]
28    pub fn get_kind(this: &MediaStreamTrackGeneratorInit) -> ::alloc::string::String;
29    #[cfg(web_sys_unstable_apis)]
30    #[doc = "Change the `kind` field of this object."]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackGeneratorInit`*"]
33    #[doc = ""]
34    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
35    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
36    #[wasm_bindgen(method, setter = "kind")]
37    pub fn set_kind(this: &MediaStreamTrackGeneratorInit, val: &str);
38}
39#[cfg(web_sys_unstable_apis)]
40impl MediaStreamTrackGeneratorInit {
41    #[doc = "Construct a new `MediaStreamTrackGeneratorInit`."]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackGeneratorInit`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
47    pub fn new(kind: &str) -> Self {
48        #[allow(unused_mut)]
49        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
50        ret.set_kind(kind);
51        ret
52    }
53    #[cfg(web_sys_unstable_apis)]
54    #[deprecated = "Use `set_kind()` instead."]
55    pub fn kind(&mut self, val: &str) -> &mut Self {
56        self.set_kind(val);
57        self
58    }
59}