web_sys/features/
gen_EncodedAudioChunk.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 = EncodedAudioChunk , typescript_type = "EncodedAudioChunk")]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `EncodedAudioChunk` class."]
11    #[doc = ""]
12    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedAudioChunk)"]
13    #[doc = ""]
14    #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunk`*"]
15    #[doc = ""]
16    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
17    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
18    pub type EncodedAudioChunk;
19    #[cfg(web_sys_unstable_apis)]
20    #[cfg(feature = "EncodedAudioChunkType")]
21    # [wasm_bindgen (structural , method , getter , js_class = "EncodedAudioChunk" , js_name = type)]
22    #[doc = "Getter for the `type` field of this object."]
23    #[doc = ""]
24    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedAudioChunk/type)"]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunk`, `EncodedAudioChunkType`*"]
27    #[doc = ""]
28    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
29    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
30    pub fn type_(this: &EncodedAudioChunk) -> EncodedAudioChunkType;
31    #[cfg(web_sys_unstable_apis)]
32    # [wasm_bindgen (structural , method , getter , js_class = "EncodedAudioChunk" , js_name = timestamp)]
33    #[doc = "Getter for the `timestamp` field of this object."]
34    #[doc = ""]
35    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedAudioChunk/timestamp)"]
36    #[doc = ""]
37    #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunk`*"]
38    #[doc = ""]
39    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
40    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
41    pub fn timestamp(this: &EncodedAudioChunk) -> f64;
42    #[cfg(web_sys_unstable_apis)]
43    # [wasm_bindgen (structural , method , getter , js_class = "EncodedAudioChunk" , js_name = duration)]
44    #[doc = "Getter for the `duration` field of this object."]
45    #[doc = ""]
46    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedAudioChunk/duration)"]
47    #[doc = ""]
48    #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunk`*"]
49    #[doc = ""]
50    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
51    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
52    pub fn duration(this: &EncodedAudioChunk) -> Option<f64>;
53    #[cfg(web_sys_unstable_apis)]
54    # [wasm_bindgen (structural , method , getter , js_class = "EncodedAudioChunk" , js_name = byteLength)]
55    #[doc = "Getter for the `byteLength` field of this object."]
56    #[doc = ""]
57    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedAudioChunk/byteLength)"]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunk`*"]
60    #[doc = ""]
61    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
62    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
63    pub fn byte_length(this: &EncodedAudioChunk) -> u32;
64    #[cfg(web_sys_unstable_apis)]
65    #[cfg(feature = "EncodedAudioChunkInit")]
66    #[wasm_bindgen(catch, constructor, js_class = "EncodedAudioChunk")]
67    #[doc = "The `new EncodedAudioChunk(..)` constructor, creating a new instance of `EncodedAudioChunk`."]
68    #[doc = ""]
69    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedAudioChunk/EncodedAudioChunk)"]
70    #[doc = ""]
71    #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunk`, `EncodedAudioChunkInit`*"]
72    #[doc = ""]
73    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
74    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
75    pub fn new(init: &EncodedAudioChunkInit) -> Result<EncodedAudioChunk, JsValue>;
76    #[cfg(web_sys_unstable_apis)]
77    # [wasm_bindgen (catch , method , structural , js_class = "EncodedAudioChunk" , js_name = copyTo)]
78    #[doc = "The `copyTo()` method."]
79    #[doc = ""]
80    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedAudioChunk/copyTo)"]
81    #[doc = ""]
82    #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunk`*"]
83    #[doc = ""]
84    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
85    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
86    pub fn copy_to_with_buffer_source(
87        this: &EncodedAudioChunk,
88        destination: &::js_sys::Object,
89    ) -> Result<(), JsValue>;
90    #[cfg(web_sys_unstable_apis)]
91    # [wasm_bindgen (catch , method , structural , js_class = "EncodedAudioChunk" , js_name = copyTo)]
92    #[doc = "The `copyTo()` method."]
93    #[doc = ""]
94    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedAudioChunk/copyTo)"]
95    #[doc = ""]
96    #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunk`*"]
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 copy_to_with_u8_slice(
101        this: &EncodedAudioChunk,
102        destination: &mut [u8],
103    ) -> Result<(), JsValue>;
104    #[cfg(web_sys_unstable_apis)]
105    # [wasm_bindgen (catch , method , structural , js_class = "EncodedAudioChunk" , js_name = copyTo)]
106    #[doc = "The `copyTo()` method."]
107    #[doc = ""]
108    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedAudioChunk/copyTo)"]
109    #[doc = ""]
110    #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunk`*"]
111    #[doc = ""]
112    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
113    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
114    pub fn copy_to_with_u8_array(
115        this: &EncodedAudioChunk,
116        destination: &::js_sys::Uint8Array,
117    ) -> Result<(), JsValue>;
118}