#[non_exhaustive]pub enum HuggingFaceError {
InvalidInput {
message: String,
},
CacheMiss {
message: String,
},
Incomplete {
message: String,
},
Hub {
message: String,
},
Io {
message: String,
},
}Expand description
An error returned while resolving a model from the Hugging Face Hub.
External transport errors are converted to contextual strings so this type remains stable, cloneable, and comparable.
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.
InvalidInput
A repository, revision, or filename is invalid.
CacheMiss
The requested revision is not present in the selected local cache.
Incomplete
A repository snapshot lacks required runtime files or metadata.
Hub
A Hugging Face API or download operation failed.
Io
A local cache operation failed.
Trait Implementations§
Source§impl Clone for HuggingFaceError
impl Clone for HuggingFaceError
Source§fn clone(&self) -> HuggingFaceError
fn clone(&self) -> HuggingFaceError
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 HuggingFaceError
impl Debug for HuggingFaceError
Source§impl Display for HuggingFaceError
impl Display for HuggingFaceError
impl Eq for HuggingFaceError
Source§impl Error for HuggingFaceError
impl Error for HuggingFaceError
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 HuggingFaceError
impl PartialEq for HuggingFaceError
impl StructuralPartialEq for HuggingFaceError
Auto Trait Implementations§
impl Freeze for HuggingFaceError
impl RefUnwindSafe for HuggingFaceError
impl Send for HuggingFaceError
impl Sync for HuggingFaceError
impl Unpin for HuggingFaceError
impl UnsafeUnpin for HuggingFaceError
impl UnwindSafe for HuggingFaceError
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