pub enum YoutubeError<RequestError, ResponseError, ChallengeError> {
Url(String),
Request(RequestError),
Response(ResponseError),
MissingPlayerResponse,
MissingApiKey,
Unavailable(String),
NoDirectFormat,
Challenge(ChallengeError),
Withheld(WithheldReason),
}Expand description
Denotes failure to interpret one Youtube watch URL.
Variants§
Url(String)
Denotes a malformed or unsupported Youtube URL.
Request(RequestError)
Denotes request execution failure.
Response(ResponseError)
Denotes response decoding failure.
MissingPlayerResponse
Denotes absence of a parseable player response.
MissingApiKey
Denotes absence of the player API key in the watch-page configuration.
Denotes an unavailable video according to the player response.
NoDirectFormat
Denotes absence of any described format.
Challenge(ChallengeError)
Denotes failure to resolve the challenges the player response poses.
Withheld(WithheldReason)
Denotes that every described format stayed guarded by an unresolved challenge.
Trait Implementations§
Source§impl<RequestError: Debug, ResponseError: Debug, ChallengeError: Debug> Debug for YoutubeError<RequestError, ResponseError, ChallengeError>
impl<RequestError: Debug, ResponseError: Debug, ChallengeError: Debug> Debug for YoutubeError<RequestError, ResponseError, ChallengeError>
Source§impl<RequestError, ResponseError, ChallengeError> Display for YoutubeError<RequestError, ResponseError, ChallengeError>
impl<RequestError, ResponseError, ChallengeError> Display for YoutubeError<RequestError, ResponseError, ChallengeError>
Source§impl<RequestError, ResponseError, ChallengeError> Error for YoutubeError<RequestError, ResponseError, ChallengeError>
impl<RequestError, ResponseError, ChallengeError> Error for YoutubeError<RequestError, ResponseError, ChallengeError>
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()
Auto Trait Implementations§
impl<RequestError, ResponseError, ChallengeError> Freeze for YoutubeError<RequestError, ResponseError, ChallengeError>
impl<RequestError, ResponseError, ChallengeError> RefUnwindSafe for YoutubeError<RequestError, ResponseError, ChallengeError>
impl<RequestError, ResponseError, ChallengeError> Send for YoutubeError<RequestError, ResponseError, ChallengeError>
impl<RequestError, ResponseError, ChallengeError> Sync for YoutubeError<RequestError, ResponseError, ChallengeError>
impl<RequestError, ResponseError, ChallengeError> Unpin for YoutubeError<RequestError, ResponseError, ChallengeError>
impl<RequestError, ResponseError, ChallengeError> UnsafeUnpin for YoutubeError<RequestError, ResponseError, ChallengeError>
impl<RequestError, ResponseError, ChallengeError> UnwindSafe for YoutubeError<RequestError, ResponseError, ChallengeError>
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> 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