pub const HF_SCHEME: &str = "hf";
pub const HUGGINGFACE_SCHEME: &str = "huggingface";
pub fn register_hf_service(registry: &opendal_core::OperatorRegistry) {
registry.register::<Hf>(HF_SCHEME);
registry.register::<Hf>(HUGGINGFACE_SCHEME);
}
mod backend;
mod config;
mod core;
mod deleter;
mod error;
mod lister;
mod reader;
mod uri;
mod writer;
pub use backend::HfBuilder as Hf;
pub use config::HfConfig;
#[doc(hidden)]
pub type Huggingface = Hf;
#[doc(hidden)]
pub type HuggingfaceConfig = HfConfig;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn type_aliases_are_interchangeable() {
let _: Huggingface = Hf::default().repo_id("org/repo");
let _: HuggingfaceConfig = HfConfig::default();
}
#[test]
fn scheme_constants() {
assert_eq!(HF_SCHEME, "hf");
assert_eq!(HUGGINGFACE_SCHEME, "huggingface");
}
}