pub struct Operation<'a, T, L = ()> { /* private fields */ }Implementations§
Source§impl<T: Transcriber, L: Layer> Operation<'_, T, L>
impl<T: Transcriber, L: Layer> Operation<'_, T, L>
pub fn next_finalized( &mut self, recording: &mut RecordingReader, ) -> Result<Option<TranscriptSegment>, TranscriptionError>
Sourcepub fn completed(&self) -> Option<&Transcript>
pub fn completed(&self) -> Option<&Transcript>
The completed transcript, available from the step that ends the recording — before the caller has drained the operation. A streaming caller checks it so a delivery that fails afterwards cannot lose the utterance.
Sourcepub fn retained_from(&self) -> u64
pub fn retained_from(&self) -> u64
The earliest stream position this operation may still read. A caller done with everything behind it can release that audio.
Whole-recording transcription holds position zero: it hands the transcriber the entire recording at once.
pub fn next_update( &mut self, recording: &mut RecordingReader, ) -> Result<Option<TranscriptUpdate>, TranscriptionError>
Sourcepub fn next(
&mut self,
recording: &mut RecordingReader,
previews: bool,
) -> Result<Option<TranscriptUpdate>, TranscriptionError>
pub fn next( &mut self, recording: &mut RecordingReader, previews: bool, ) -> Result<Option<TranscriptUpdate>, TranscriptionError>
The next update, with provisional words only when previews asks
for them. Without previews, none are built.
pub fn finish( &mut self, recording: &mut RecordingReader, ) -> Result<Transcript, TranscriptionError>
Auto Trait Implementations§
impl<'a, T, L = ()> !RefUnwindSafe for Operation<'a, T, L>
impl<'a, T, L = ()> !Sync for Operation<'a, T, L>
impl<'a, T, L = ()> !UnwindSafe for Operation<'a, T, L>
impl<'a, T, L> Freeze for Operation<'a, T, L>
impl<'a, T, L> Send for Operation<'a, T, L>
impl<'a, T, L> Unpin for Operation<'a, T, L>
impl<'a, T, L> UnsafeUnpin for Operation<'a, T, L>
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