#[non_exhaustive]pub struct TranscriptEvent {
pub delta: Option<String>,
pub segment_id: Option<String>,
pub segment: Option<TranscriptSegment>,
pub done: Option<Box<TranscriptionResponse>>,
pub extras: Extras,
}Expand description
One event of a streamed transcript: a piece of text, a finished segment, or the end.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.delta: Option<String>More text of the transcript.
segment_id: Option<String>The segment the text belongs to, for providers that name it.
segment: Option<TranscriptSegment>A finished segment, with its time and speaker.
done: Option<Box<TranscriptionResponse>>The whole transcript, at the end.
extras: ExtrasImplementations§
Source§impl TranscriptEvent
impl TranscriptEvent
pub fn delta(text: impl Into<String>) -> Self
pub fn segment(segment: TranscriptSegment) -> Self
pub fn done(transcript: TranscriptionResponse) -> Self
Trait Implementations§
Source§impl Clone for TranscriptEvent
impl Clone for TranscriptEvent
Source§impl Debug for TranscriptEvent
impl Debug for TranscriptEvent
Source§impl Default for TranscriptEvent
impl Default for TranscriptEvent
Source§impl<'de> Deserialize<'de> for TranscriptEvent
impl<'de> Deserialize<'de> for TranscriptEvent
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
Source§impl PartialEq for TranscriptEvent
impl PartialEq for TranscriptEvent
Source§impl Serialize for TranscriptEvent
impl Serialize for TranscriptEvent
impl StructuralPartialEq for TranscriptEvent
Auto Trait Implementations§
impl Forget for TranscriptEvent
impl Freeze for TranscriptEventwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, RawJson>>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
*const TranscriptionResponse is !null: Freeze,
PhantomData<TranscriptionResponse>: Freeze,
impl Move for TranscriptEvent
impl RefUnwindSafe for TranscriptEvent
impl Send for TranscriptEvent
impl Sync for TranscriptEvent
impl Unpin for TranscriptEvent
impl UnsafeUnpin for TranscriptEventwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, RawJson>>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
*const TranscriptionResponse is !null: UnsafeUnpin,
PhantomData<TranscriptionResponse>: UnsafeUnpin,
impl UnwindSafe for TranscriptEventwhere
RawVecInner: UnwindSafe,
NonNull<u8>: UnwindSafe,
BoxRaw<RawValue>: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
BoxRaw<TranscriptionResponse>: UnwindSafe,
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