pub enum CaptionError {
BadTimestamp {
line: usize,
text: String,
},
MissingTiming {
line: usize,
},
Empty,
NotRecognized,
}Expand description
Why parsing a subtitle file failed.
Variants§
BadTimestamp
A timestamp line was not HH:MM:SS,mmm --> HH:MM:SS,mmm.
MissingTiming
A cue block had no --> timing line.
Empty
The input had no cues at all.
NotRecognized
Text did not look like the requested format (e.g. no WEBVTT header).
Trait Implementations§
Source§impl Clone for CaptionError
impl Clone for CaptionError
Source§fn clone(&self) -> CaptionError
fn clone(&self) -> CaptionError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CaptionError
impl Debug for CaptionError
Source§impl Display for CaptionError
impl Display for CaptionError
impl Eq for CaptionError
Source§impl Error for CaptionError
impl Error for CaptionError
1.30.0 · 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 PartialEq for CaptionError
impl PartialEq for CaptionError
impl StructuralPartialEq for CaptionError
Auto Trait Implementations§
impl Forget for CaptionError
impl Freeze for CaptionError
impl Move for CaptionError
impl RefUnwindSafe for CaptionError
impl Send for CaptionError
impl Sync for CaptionError
impl Unpin for CaptionError
impl UnsafeUnpin for CaptionError
impl UnwindSafe for CaptionError
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more