Skip to main content

Operation

Struct Operation 

Source
pub struct Operation<'a, T, L = ()> { /* private fields */ }

Implementations§

Source§

impl<T: Transcriber, L: Layer> Operation<'_, T, L>

Source

pub fn next_finalized( &mut self, recording: &mut RecordingReader, ) -> Result<Option<TranscriptSegment>, TranscriptionError>

Source

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.

Source

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.

Source

pub fn served_by(&self) -> Option<&'static str>

The engine a delegated operation runs on. Local plans name none.

Source

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.

Source

pub fn next_update( &mut self, recording: &mut RecordingReader, ) -> Result<Option<TranscriptUpdate>, TranscriptionError>

Source

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.

Source

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>
where &'a T: Send, &'a L: Send,

§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more