#[non_exhaustive]pub enum VideoError {
Http(HttpError),
Api {
status: u16,
message: String,
},
InvalidResponse(String),
Unsupported(&'static str),
UnknownProvider(String),
MissingApiKey(&'static str),
MissingBaseUrl(&'static str),
}Expand description
Errors of video providers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Http(HttpError)
The request could not be sent or the response could not be read.
Api
The API answered with an error status.
InvalidResponse(String)
The API answered with something the provider cannot read.
Unsupported(&'static str)
The provider cannot do this, for example cancel a job.
UnknownProvider(String)
No provider matches the model name.
MissingApiKey(&'static str)
The environment variable with the API key is not set.
MissingBaseUrl(&'static str)
The environment variable with the base URL is not set.
Implementations§
Trait Implementations§
Source§impl Debug for VideoError
impl Debug for VideoError
Source§impl Display for VideoError
impl Display for VideoError
Source§impl Error for VideoError
impl Error for VideoError
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 !RefUnwindSafe for VideoError
impl !UnwindSafe for VideoError
impl Forget for VideoError
impl Freeze for VideoError
impl Move for VideoError
impl Send for VideoError
impl Sync for VideoError
impl Unpin for VideoError
impl UnsafeUnpin for VideoError
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