pub struct ModelConfig {
pub name: String,
pub sha256: String,
pub size_bytes: Option<u64>,
pub source_url: String,
pub license: Option<String>,
}Expand description
Per-model entry: pinned URL + pinned SHA-256 + name.
The shape mirrors fetch::ModelSpec but as a serde-deserialisable
config-file type. Conversion is straightforward (From impl below).
Note: there is no filename field. The blob’s on-disk location
is derived from its SHA-256 (CAS layout, ADR 0011); the manifest
at <store>/manifests/<name>.json is the only place a name maps
to a blob.
Fields§
§name: StringStable identifier, e.g. "gemma-4-e4b". Used as the manifest
filename and the lock-file basename.
sha256: StringLowercase hex SHA-256 of the GGUF bytes. Required.
size_bytes: Option<u64>Advisory total size for progress reporting + manifest.
source_url: StringDirect-download HTTPS endpoint. Must be https://.
license: Option<String>SPDX-style license id when known. Recorded in the manifest.
Trait Implementations§
Source§impl Clone for ModelConfig
impl Clone for ModelConfig
Source§fn clone(&self) -> ModelConfig
fn clone(&self) -> ModelConfig
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 ModelConfig
impl Debug for ModelConfig
Source§impl<'de> Deserialize<'de> for ModelConfig
impl<'de> Deserialize<'de> for ModelConfig
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
Source§impl From<&ModelConfig> for ModelSpec
impl From<&ModelConfig> for ModelSpec
Source§fn from(m: &ModelConfig) -> Self
fn from(m: &ModelConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ModelConfig
impl RefUnwindSafe for ModelConfig
impl Send for ModelConfig
impl Sync for ModelConfig
impl Unpin for ModelConfig
impl UnsafeUnpin for ModelConfig
impl UnwindSafe for ModelConfig
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