pub struct Repo { /* private fields */ }
Expand description
The representation of a repo on the hub.
Implementations§
source§impl Repo
impl Repo
sourcepub fn new(repo_id: String, repo_type: RepoType) -> Self
pub fn new(repo_id: String, repo_type: RepoType) -> Self
Repo with the default branch (“main”).
sourcepub fn with_revision(
repo_id: String,
repo_type: RepoType,
revision: String
) -> Self
pub fn with_revision( repo_id: String, repo_type: RepoType, revision: String ) -> Self
fully qualified Repo
sourcepub fn model(repo_id: String) -> Self
pub fn model(repo_id: String) -> Self
Shortcut for Repo::new
with RepoType::Model
sourcepub fn dataset(repo_id: String) -> Self
pub fn dataset(repo_id: String) -> Self
Shortcut for Repo::new
with RepoType::Dataset
sourcepub fn space(repo_id: String) -> Self
pub fn space(repo_id: String) -> Self
Shortcut for Repo::new
with RepoType::Space
sourcepub fn folder_name(&self) -> String
pub fn folder_name(&self) -> String
The normalized folder nameof the repo within the cache directory
sourcepub fn url_revision(&self) -> String
pub fn url_revision(&self) -> String
Revision needs to be url escaped before being used in a URL
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Repo
impl Send for Repo
impl Sync for Repo
impl Unpin for Repo
impl UnwindSafe for Repo
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