pub enum Voice {
VoiceIDsShared(String),
Custom {
id: String,
},
}Expand description
Built-in voice name (e.g. “alloy”, “ash”) or custom voice reference.
Variant order matters for #[serde(untagged)]: a bare JSON string (e.g. "alloy")
always deserializes as BuiltIn. A JSON object {"id": "..."} fails BuiltIn
and falls through to Custom. The two forms are structurally distinct (string vs
object) per the OpenAI spec, so there is no ambiguity.
Variants§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Voice
impl<'de> Deserialize<'de> for Voice
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 Voice
impl RefUnwindSafe for Voice
impl Send for Voice
impl Sync for Voice
impl Unpin for Voice
impl UnsafeUnpin for Voice
impl UnwindSafe for Voice
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