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 read_to(&self) -> u64
pub fn read_to(&self) -> u64
How far audio had been read for decoding when the latest update was produced. A local strategy reads the caller’s recording; a delegated one reports where the transcriber read to.
Sourcepub fn served_by(&self) -> Option<&'static str>
pub fn served_by(&self) -> Option<&'static str>
The engine a delegated operation runs on. Local plans name none.
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.