pub struct HfModel {
pub id: String,
pub sha: String,
pub tags: Vec<String>,
pub gated: Value,
pub private: bool,
pub siblings: Vec<Sibling>,
pub pipeline_tag: Option<String>,
}Fields§
§id: String§sha: String§gated: Value§private: bool§siblings: Vec<Sibling>§pipeline_tag: Option<String>Implementations§
Source§impl HfModel
impl HfModel
pub fn parse(raw: &str) -> Result<Self, ValidationError>
Sourcepub fn pinned(&self) -> bool
pub fn pinned(&self) -> bool
Pinned revisions only: a 40-hex commit, not gated and not private.
pub fn base_model(&self) -> Option<String>
Sourcepub fn base_models(&self) -> Vec<String>
pub fn base_models(&self) -> Vec<String>
Direct base models (not base_model:finetune:… relations), at most four.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HfModel
impl<'de> Deserialize<'de> for HfModel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HfModel
impl RefUnwindSafe for HfModel
impl Send for HfModel
impl Sync for HfModel
impl Unpin for HfModel
impl UnsafeUnpin for HfModel
impl UnwindSafe for HfModel
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