pub struct TtsEventPayload {
pub event_type: String,
pub id: Option<String>,
pub error: Option<String>,
pub interrupted: Option<bool>,
pub reason: Option<String>,
}Expand description
On desktop, emitted directly via app.emit("tts://<event_type>", payload).
On mobile, native plugins send this through a Tauri Channel; the Rust relay
deserializes it and re-emits via app.emit() so JS listen("tts://...") works
uniformly on every platform.
The shape matches the JS SpeechEvent interface.
Fields§
§event_type: StringThe event name, e.g. “speech:finish”. Used to build the emit key “tts://<event_type>”.
id: Option<String>Unique identifier for the utterance (if available)
error: Option<String>Error message (for error events)
interrupted: Option<bool>Whether speech was interrupted
reason: Option<String>Reason for the event (e.g. “audio_focus_lost”, “app_paused”)
Trait Implementations§
Source§impl Clone for TtsEventPayload
impl Clone for TtsEventPayload
Source§fn clone(&self) -> TtsEventPayload
fn clone(&self) -> TtsEventPayload
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TtsEventPayload
impl Debug for TtsEventPayload
Source§impl Default for TtsEventPayload
impl Default for TtsEventPayload
Source§fn default() -> TtsEventPayload
fn default() -> TtsEventPayload
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TtsEventPayload
impl<'de> Deserialize<'de> for TtsEventPayload
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TtsEventPayload
impl RefUnwindSafe for TtsEventPayload
impl Send for TtsEventPayload
impl Sync for TtsEventPayload
impl Unpin for TtsEventPayload
impl UnsafeUnpin for TtsEventPayload
impl UnwindSafe for TtsEventPayload
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more