pub struct AliasEntry {
pub alias: String,
pub target: String,
pub default_quant: Option<String>,
pub variants: HashMap<String, String>,
pub description: Option<String>,
}Expand description
An alias entry mapping short name to full reference
Fields§
§alias: StringShort name (e.g., “llama3”)
target: StringFull model reference
default_quant: Option<String>Default quantization
variants: HashMap<String, String>Available variants (size tags)
description: Option<String>Description
Implementations§
Source§impl AliasEntry
impl AliasEntry
Sourcepub fn new(alias: impl Into<String>, target: impl Into<String>) -> Self
pub fn new(alias: impl Into<String>, target: impl Into<String>) -> Self
Create a new alias entry
Sourcepub fn with_default_quant(self, quant: impl Into<String>) -> Self
pub fn with_default_quant(self, quant: impl Into<String>) -> Self
Set default quantization
Sourcepub fn with_variant(
self,
tag: impl Into<String>,
target: impl Into<String>,
) -> Self
pub fn with_variant( self, tag: impl Into<String>, target: impl Into<String>, ) -> Self
Add a size variant
Sourcepub fn with_description(self, desc: impl Into<String>) -> Self
pub fn with_description(self, desc: impl Into<String>) -> Self
Set description
Sourcepub fn resolve_variant(&self, variant: Option<&str>) -> &str
pub fn resolve_variant(&self, variant: Option<&str>) -> &str
Resolve a variant tag to full target
Trait Implementations§
Source§impl Clone for AliasEntry
impl Clone for AliasEntry
Source§fn clone(&self) -> AliasEntry
fn clone(&self) -> AliasEntry
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 AliasEntry
impl Debug for AliasEntry
Source§impl<'de> Deserialize<'de> for AliasEntry
impl<'de> Deserialize<'de> for AliasEntry
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 AliasEntry
impl RefUnwindSafe for AliasEntry
impl Send for AliasEntry
impl Sync for AliasEntry
impl Unpin for AliasEntry
impl UnsafeUnpin for AliasEntry
impl UnwindSafe for AliasEntry
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