pub struct ModelZooEntry {Show 17 fields
pub id: String,
pub name: String,
pub description: String,
pub version: String,
pub author: AuthorInfo,
pub model_type: ModelZooType,
pub quality_score: f32,
pub tags: Vec<String>,
pub download_url: String,
pub size_bytes: u64,
pub sha256: String,
pub license: String,
pub created_at: String,
pub updated_at: String,
pub downloads: u64,
pub stars: u64,
pub metadata: HashMap<String, String>,
}Expand description
Model zoo entry for sharing and discovery
Fields§
§id: StringUnique model identifier (slug format)
name: StringHuman-readable name
description: StringModel description
version: StringVersion string (semver)
Author information
model_type: ModelZooTypeModel type identifier
quality_score: f32Quality score (cached, 0-100)
Tags for discovery
download_url: StringDownload URL
size_bytes: u64File size in bytes
sha256: StringSHA-256 hash for verification
license: StringLicense identifier (SPDX)
created_at: StringCreation timestamp (ISO 8601)
updated_at: StringLast updated timestamp (ISO 8601)
downloads: u64Download count
stars: u64Star count (user favorites)
metadata: HashMap<String, String>Custom metadata
Implementations§
Source§impl ModelZooEntry
impl ModelZooEntry
Sourcepub fn new(id: impl Into<String>, name: impl Into<String>) -> ModelZooEntry
pub fn new(id: impl Into<String>, name: impl Into<String>) -> ModelZooEntry
Create a new model zoo entry
Sourcepub fn with_description(self, description: impl Into<String>) -> ModelZooEntry
pub fn with_description(self, description: impl Into<String>) -> ModelZooEntry
Set description
Sourcepub fn with_version(self, version: impl Into<String>) -> ModelZooEntry
pub fn with_version(self, version: impl Into<String>) -> ModelZooEntry
Set version
Set author
Sourcepub fn with_model_type(self, model_type: ModelZooType) -> ModelZooEntry
pub fn with_model_type(self, model_type: ModelZooType) -> ModelZooEntry
Set model type
Sourcepub fn with_quality_score(self, score: f32) -> ModelZooEntry
pub fn with_quality_score(self, score: f32) -> ModelZooEntry
Set quality score
Sourcepub fn with_tag(self, tag: impl Into<String>) -> ModelZooEntry
pub fn with_tag(self, tag: impl Into<String>) -> ModelZooEntry
Add a tag
Sourcepub fn with_download_url(self, url: impl Into<String>) -> ModelZooEntry
pub fn with_download_url(self, url: impl Into<String>) -> ModelZooEntry
Set download URL
Sourcepub fn with_size(self, size_bytes: u64) -> ModelZooEntry
pub fn with_size(self, size_bytes: u64) -> ModelZooEntry
Set file size
Sourcepub fn with_sha256(self, hash: impl Into<String>) -> ModelZooEntry
pub fn with_sha256(self, hash: impl Into<String>) -> ModelZooEntry
Set SHA-256 hash
Sourcepub fn with_license(self, license: impl Into<String>) -> ModelZooEntry
pub fn with_license(self, license: impl Into<String>) -> ModelZooEntry
Set license
Sourcepub fn with_timestamps(
self,
created: impl Into<String>,
updated: impl Into<String>,
) -> ModelZooEntry
pub fn with_timestamps( self, created: impl Into<String>, updated: impl Into<String>, ) -> ModelZooEntry
Set timestamps
Sourcepub fn with_metadata(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> ModelZooEntry
pub fn with_metadata( self, key: impl Into<String>, value: impl Into<String>, ) -> ModelZooEntry
Add custom metadata
Sourcepub fn human_size(&self) -> String
pub fn human_size(&self) -> String
Get human-readable file size
Sourcepub fn matches_query(&self, query: &str) -> bool
pub fn matches_query(&self, query: &str) -> bool
Check if entry matches search query
Sourcepub fn quality_grade(&self) -> &'static str
pub fn quality_grade(&self) -> &'static str
Get quality grade letter
Trait Implementations§
Source§impl Clone for ModelZooEntry
impl Clone for ModelZooEntry
Source§fn clone(&self) -> ModelZooEntry
fn clone(&self) -> ModelZooEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelZooEntry
impl Debug for ModelZooEntry
Auto Trait Implementations§
impl Freeze for ModelZooEntry
impl RefUnwindSafe for ModelZooEntry
impl Send for ModelZooEntry
impl Sync for ModelZooEntry
impl Unpin for ModelZooEntry
impl UnsafeUnpin for ModelZooEntry
impl UnwindSafe for ModelZooEntry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more