1 module libwasm.bindings.SpeechRecognitionError; 2 3 import libwasm.types; 4 5 import memutils.ct: tuple; 6 import libwasm.bindings.Event; 7 8 @safe: 9 nothrow: 10 11 struct SpeechRecognitionError { 12 nothrow: 13 libwasm.bindings.Event.Event _parent; 14 alias _parent this; 15 this(Handle h) { 16 _parent = .Event(h); 17 } 18 SpeechRecognitionErrorCode error()() { 19 return Object_Getter__int(this._parent, "error"); 20 } 21 Optional!(string) message()() { 22 return Object_Getter__OptionalString(this._parent, "message"); 23 } 24 } 25 enum SpeechRecognitionErrorCode { 26 no_speech, 27 aborted, 28 audio_capture, 29 network, 30 not_allowed, 31 service_not_allowed, 32 bad_grammar, 33 language_not_supported 34 } 35 struct SpeechRecognitionErrorInit { 36 nothrow: 37 libwasm.bindings.Event.EventInit _parent; 38 alias _parent this; 39 this(Handle h) { 40 _parent = .EventInit(h); 41 } 42 static auto create() { 43 return SpeechRecognitionErrorInit(libwasm_add__object()); 44 } 45 void error()(SpeechRecognitionErrorCode error) { 46 Object_Call_int__void(this._parent, "error", error); 47 } 48 SpeechRecognitionErrorCode error()() { 49 return Object_Getter__int(this._parent, "error"); 50 } 51 void message()(string message) { 52 Object_Call_string__void(this._parent, "message", message); 53 } 54 string message()() { 55 return Object_Getter__string(this._parent, "message"); 56 } 57 } 58 59