pub enum TtsError {
Connect(String),
Ws(Error),
Io(Error),
NoAudio,
}Expand description
All ways a synthesis request can fail.
Callers typically propagate this with ? or match on a variant to
decide whether to retry (e.g. TtsError::Connect after a network blip).
Variants§
Connect(String)
The WebSocket handshake or DRM-token auth failed after all retry attempts. The inner string is the last underlying error message.
Ws(Error)
Transport-level WebSocket error (handshake, frame decode, TLS).
Io(Error)
I/O error on the underlying TCP stream, including receive idle timeout.
NoAudio
The turn completed (or the stream closed) without any audio frames.
Trait Implementations§
Source§impl Error for TtsError
impl Error for TtsError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !Freeze for TtsError
impl !RefUnwindSafe for TtsError
impl !UnwindSafe for TtsError
impl Send for TtsError
impl Sync for TtsError
impl Unpin for TtsError
impl UnsafeUnpin for TtsError
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