pub enum CaptionGenError {
Alignment(AlignmentError),
InvalidParameter(String),
InvalidTimestamp,
EmptyTranscript,
ParseError(String),
}Expand description
Errors produced by caption generation operations.
Note: Clone and PartialEq are intentionally not derived because the
feature-gated [CaptionGenError::Ml] variant wraps [oximedia_ml::MlError]
which implements neither trait. Equality and cloning of error values are
uncommon for caption-generation callers (errors typically flow through ?
once and are rendered via Display), so dropping those derives is the
minimum-impact way of extending the enum for ML.
Variants§
Alignment(AlignmentError)
A speech-to-caption alignment operation failed.
InvalidParameter(String)
A parameter value is invalid.
InvalidTimestamp
A timestamp is invalid (e.g. start >= end).
EmptyTranscript
The transcript is empty and cannot be processed.
ParseError(String)
Parsing of caption data or configuration failed.
Trait Implementations§
Source§impl Debug for CaptionGenError
impl Debug for CaptionGenError
Source§impl Display for CaptionGenError
impl Display for CaptionGenError
Source§impl Error for CaptionGenError
impl Error for CaptionGenError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<AlignmentError> for CaptionGenError
impl From<AlignmentError> for CaptionGenError
Source§fn from(source: AlignmentError) -> Self
fn from(source: AlignmentError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CaptionGenError
impl RefUnwindSafe for CaptionGenError
impl Send for CaptionGenError
impl Sync for CaptionGenError
impl Unpin for CaptionGenError
impl UnsafeUnpin for CaptionGenError
impl UnwindSafe for CaptionGenError
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