pub struct Api { /* private fields */ }
Expand description
The actual Api used to interact with the hub.
Use any repo with Api::repo
Implementations§
Source§impl Api
impl Api
Sourcepub fn new() -> Result<Self, ApiError>
pub fn new() -> Result<Self, ApiError>
Creates a default Api, for Api options See ApiBuilder
Sourcepub fn model(&self, model_id: String) -> ApiRepo
pub fn model(&self, model_id: String) -> ApiRepo
Simple wrapper over
let api = Api::new().unwrap();
let api = api.repo(Repo::new(model_id, RepoType::Model));
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Api
impl !RefUnwindSafe for Api
impl Send for Api
impl Sync for Api
impl Unpin for Api
impl !UnwindSafe for Api
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