pub struct CatalogEntry {Show 16 fields
pub id: String,
pub name: String,
pub version: String,
pub source: ModelSource,
pub size_bytes: u64,
pub task: Option<Task>,
pub architecture: Option<String>,
pub quantization: Option<String>,
pub context_length: Option<u32>,
pub parameters: Option<u64>,
pub license: Option<String>,
pub description: Option<String>,
pub tags: Vec<String>,
pub downloads: u64,
pub updated_at: Option<String>,
pub uri: String,
}Expand description
A model entry in the catalog
Fields§
§id: StringUnique identifier
name: StringModel name
version: StringModel version
source: ModelSourceSource (local, remote, huggingface)
size_bytes: u64Model size in bytes
task: Option<Task>Task category
architecture: Option<String>Architecture (e.g., “llama”, “mistral”, “phi”)
quantization: Option<String>Quantization type if quantized
context_length: Option<u32>Context length
parameters: Option<u64>Number of parameters (approximate)
license: Option<String>License
description: Option<String>Description
Tags for filtering
downloads: u64Download count (for popularity)
updated_at: Option<String>Last updated timestamp
uri: StringURI for accessing the model
Implementations§
Source§impl CatalogEntry
impl CatalogEntry
Sourcepub fn new(
name: impl Into<String>,
version: impl Into<String>,
source: ModelSource,
) -> Self
pub fn new( name: impl Into<String>, version: impl Into<String>, source: ModelSource, ) -> Self
Create a new catalog entry
Sourcepub fn with_architecture(self, arch: impl Into<String>) -> Self
pub fn with_architecture(self, arch: impl Into<String>) -> Self
Set architecture
Sourcepub fn with_quantization(self, quant: impl Into<String>) -> Self
pub fn with_quantization(self, quant: impl Into<String>) -> Self
Set quantization
Sourcepub fn with_context_length(self, length: u32) -> Self
pub fn with_context_length(self, length: u32) -> Self
Set context length
Sourcepub fn with_parameters(self, params: u64) -> Self
pub fn with_parameters(self, params: u64) -> Self
Set parameters
Sourcepub fn with_license(self, license: impl Into<String>) -> Self
pub fn with_license(self, license: impl Into<String>) -> Self
Set license
Sourcepub fn with_description(self, desc: impl Into<String>) -> Self
pub fn with_description(self, desc: impl Into<String>) -> Self
Set description
Add multiple tags
Sourcepub fn with_downloads(self, downloads: u64) -> Self
pub fn with_downloads(self, downloads: u64) -> Self
Set downloads
Sourcepub fn matches_text(&self, query: &str) -> bool
pub fn matches_text(&self, query: &str) -> bool
Check if model matches a text query
Trait Implementations§
Source§impl Clone for CatalogEntry
impl Clone for CatalogEntry
Source§fn clone(&self) -> CatalogEntry
fn clone(&self) -> CatalogEntry
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 CatalogEntry
impl Debug for CatalogEntry
Source§impl<'de> Deserialize<'de> for CatalogEntry
impl<'de> Deserialize<'de> for CatalogEntry
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 CatalogEntry
impl RefUnwindSafe for CatalogEntry
impl Send for CatalogEntry
impl Sync for CatalogEntry
impl Unpin for CatalogEntry
impl UnsafeUnpin for CatalogEntry
impl UnwindSafe for CatalogEntry
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