web_sys/features/
gen_SpeechRecognitionResult.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "::js_sys::Object",
9 js_name = "SpeechRecognitionResult",
10 typescript_type = "SpeechRecognitionResult"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `SpeechRecognitionResult` class."]
14 #[doc = ""]
15 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionResult)"]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionResult`*"]
18 pub type SpeechRecognitionResult;
19 #[wasm_bindgen(
20 method,
21 getter,
22 js_class = "SpeechRecognitionResult",
23 js_name = "length"
24 )]
25 #[doc = "Getter for the `length` field of this object."]
26 #[doc = ""]
27 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionResult/length)"]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionResult`*"]
30 pub fn length(this: &SpeechRecognitionResult) -> u32;
31 #[wasm_bindgen(
32 method,
33 getter,
34 js_class = "SpeechRecognitionResult",
35 js_name = "isFinal"
36 )]
37 #[doc = "Getter for the `isFinal` field of this object."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionResult/isFinal)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionResult`*"]
42 pub fn is_final(this: &SpeechRecognitionResult) -> bool;
43 #[cfg(feature = "SpeechRecognitionAlternative")]
44 #[wasm_bindgen(method, js_class = "SpeechRecognitionResult")]
45 #[doc = "The `item()` method."]
46 #[doc = ""]
47 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionResult/item)"]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionAlternative`, `SpeechRecognitionResult`*"]
50 pub fn item(this: &SpeechRecognitionResult, index: u32) -> SpeechRecognitionAlternative;
51 #[cfg(feature = "SpeechRecognitionAlternative")]
52 #[wasm_bindgen(method, js_class = "SpeechRecognitionResult", indexing_getter)]
53 #[doc = "Indexing getter. As in the literal Javascript `this[key]`."]
54 #[doc = ""]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionAlternative`, `SpeechRecognitionResult`*"]
57 pub fn get(this: &SpeechRecognitionResult, index: u32) -> Option<SpeechRecognitionAlternative>;
58}