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,
},
ChannelNotFound {
input: 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).
ChannelNotFound
A channel locator (@handle, /c/Name, /user/Name, …) could not be
resolved to a UC… channel ID. Either the input is not a recognised
channel reference or the scraped channel page did not carry the
expected channelId token (the page format drifts, like
Self::MissingVisitorData).
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 !RefUnwindSafe for TranscriptError
impl !UnwindSafe for TranscriptError
impl Freeze for TranscriptError
impl Send for TranscriptError
impl Sync for TranscriptError
impl Unpin for TranscriptError
impl UnsafeUnpin 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> 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> 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> 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.