pub enum Event {
DownloadStarted {
file: String,
},
DownloadCompleted {
file: String,
},
DownloadProgress {
file: String,
percentage: f32,
elapsed_time: Duration,
remaining_time: Duration,
},
Segment {
start_offset: Duration,
end_offset: Duration,
percentage: f32,
transcription: String,
},
}Expand description
Events generated by the Whisper::transcribe method
Variants§
Implementations§
Source§impl Event
impl Event
Sourcepub const fn is_download_started(&self) -> bool
pub const fn is_download_started(&self) -> bool
Returns true if the enum is Event::DownloadStarted otherwise false
Sourcepub const fn is_download_completed(&self) -> bool
pub const fn is_download_completed(&self) -> bool
Returns true if the enum is Event::DownloadCompleted otherwise false
Sourcepub const fn is_download_progress(&self) -> bool
pub const fn is_download_progress(&self) -> bool
Returns true if the enum is Event::DownloadProgress otherwise false
Sourcepub const fn is_segment(&self) -> bool
pub const fn is_segment(&self) -> bool
Returns true if the enum is Event::Segment otherwise false
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T, U> ToSample<U> for Twhere
U: FromSample<T>,
impl<T, U> ToSample<U> for Twhere
U: FromSample<T>,
fn to_sample_(self) -> U
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.