asimov_huggingface/
lib.rs1mod ensure;
13pub use ensure::*;
14
15mod progress;
16pub use progress::*;
17
18use hf_hub::api::sync::ApiError;
19use std::path::PathBuf;
20use thiserror::Error;
21
22#[derive(Debug, Error)]
23pub enum HuggingfaceError {
24 #[error("failed to access Hugging Face API: {0}")]
25 Api(#[from] ApiError),
26
27 #[error("snapshot is empty")]
28 EmptySnapshot,
29
30 #[error("failed to download file `{0}`")]
31 Download(PathBuf),
32}
33
34pub type Result<T> = std::result::Result<T, HuggingfaceError>;