web_sys/features/
gen_SpeechRecognitionError.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = Event , extends = :: js_sys :: Object , js_name = SpeechRecognitionError , typescript_type = "SpeechRecognitionError")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `SpeechRecognitionError` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionError)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionError`*"]
14    pub type SpeechRecognitionError;
15    #[cfg(feature = "SpeechRecognitionErrorCode")]
16    # [wasm_bindgen (structural , method , getter , js_class = "SpeechRecognitionError" , js_name = error)]
17    #[doc = "Getter for the `error` field of this object."]
18    #[doc = ""]
19    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionError/error)"]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionError`, `SpeechRecognitionErrorCode`*"]
22    pub fn error(this: &SpeechRecognitionError) -> SpeechRecognitionErrorCode;
23    # [wasm_bindgen (structural , method , getter , js_class = "SpeechRecognitionError" , js_name = message)]
24    #[doc = "Getter for the `message` field of this object."]
25    #[doc = ""]
26    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionError/message)"]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionError`*"]
29    pub fn message(this: &SpeechRecognitionError) -> Option<::alloc::string::String>;
30    #[wasm_bindgen(catch, constructor, js_class = "SpeechRecognitionError")]
31    #[doc = "The `new SpeechRecognitionError(..)` constructor, creating a new instance of `SpeechRecognitionError`."]
32    #[doc = ""]
33    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionError/SpeechRecognitionError)"]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionError`*"]
36    pub fn new(type_: &str) -> Result<SpeechRecognitionError, JsValue>;
37    #[cfg(feature = "SpeechRecognitionErrorInit")]
38    #[wasm_bindgen(catch, constructor, js_class = "SpeechRecognitionError")]
39    #[doc = "The `new SpeechRecognitionError(..)` constructor, creating a new instance of `SpeechRecognitionError`."]
40    #[doc = ""]
41    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionError/SpeechRecognitionError)"]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionError`, `SpeechRecognitionErrorInit`*"]
44    pub fn new_with_event_init_dict(
45        type_: &str,
46        event_init_dict: &SpeechRecognitionErrorInit,
47    ) -> Result<SpeechRecognitionError, JsValue>;
48}