pub enum TranscriptError {
InvalidLocator(String),
ParseError(String),
LanguageNotFound {
requested: String,
available: Vec<String>,
},
AutoCaptionsRequireOptIn(String),
PlayabilityRefused {
status: String,
reason: Option<String>,
},
Io(Error),
Http(Error),
MissingVisitorData {
url: String,
},
}Expand description
Errors that can occur during transcript fetching, parsing, or formatting.
Variants§
InvalidLocator(String)
The supplied locator (URL, ID) could not be parsed by any source.
ParseError(String)
The media platform returned a response that did not parse as expected.
LanguageNotFound
No caption track matched the requested language.
Fields
AutoCaptionsRequireOptIn(String)
An auto-generated (asr) track was the only match but the caller did
not opt in via allow_auto.
PlayabilityRefused
The media platform refused playback (e.g. age-gated, region-locked, removed, or login-required). Carries the platform’s status string so callers can react to the specific reason rather than a generic HTTP failure.
Fields
Io(Error)
An I/O error occurred (e.g. writing transcript to a file).
Http(Error)
An HTTP transport or non-2xx response error.
MissingVisitorData
The bootstrap GET to a media platform’s watch page returned a body
without the expected session-bootstrap token. The page format drifts
every few months; this variant signals the scrape needs to be
retuned and is distinct from a generic Self::ParseError so
callers can react to it specifically (e.g. a clearer CLI message).
Trait Implementations§
Source§impl Debug for TranscriptError
impl Debug for TranscriptError
Source§impl Display for TranscriptError
impl Display for TranscriptError
Source§impl Error for TranscriptError
impl Error for TranscriptError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Error> for TranscriptError
impl From<Error> for TranscriptError
Auto Trait Implementations§
impl Freeze for TranscriptError
impl !RefUnwindSafe for TranscriptError
impl Send for TranscriptError
impl Sync for TranscriptError
impl Unpin for TranscriptError
impl UnsafeUnpin for TranscriptError
impl !UnwindSafe for TranscriptError
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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<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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read moreSource§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.