pub enum CompletionKey {
HfFile {
repo_id: String,
revision: String,
filename_canon: String,
quantization: Option<String>,
},
UrlFile {
url: String,
filename: String,
},
LocalFile {
path: String,
},
}Expand description
Stable artifact identity for completion tracking.
This key is computed at enqueue time (before download starts) and remains stable across retries, failures, and sharded downloads. It represents “what the user thinks they downloaded” from an artifact perspective, not a request perspective.
§Identity Semantics
- Same artifact downloaded twice → same key (deduplication)
- All shards in a group → same key (one entry)
- Failures before metadata available → key still valid
- Survives cancellations and retries
Variants§
HfFile
HuggingFace model file.
Fields
§
revision: StringGit revision (branch, tag, or commit SHA). Stores exactly what the user requested (e.g., “main”, “v1.0”, or a SHA). Use “unspecified” if no revision was provided.
UrlFile
File downloaded from URL.
LocalFile
Local file operation.
Trait Implementations§
Source§impl Clone for CompletionKey
impl Clone for CompletionKey
Source§fn clone(&self) -> CompletionKey
fn clone(&self) -> CompletionKey
Returns a duplicate of the value. Read more
1.0.0 · 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 CompletionKey
impl Debug for CompletionKey
Source§impl<'de> Deserialize<'de> for CompletionKey
impl<'de> Deserialize<'de> for CompletionKey
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 Display for CompletionKey
impl Display for CompletionKey
Source§impl Hash for CompletionKey
impl Hash for CompletionKey
Source§impl PartialEq for CompletionKey
impl PartialEq for CompletionKey
Source§impl Serialize for CompletionKey
impl Serialize for CompletionKey
impl Eq for CompletionKey
impl StructuralPartialEq for CompletionKey
Auto Trait Implementations§
impl Freeze for CompletionKey
impl RefUnwindSafe for CompletionKey
impl Send for CompletionKey
impl Sync for CompletionKey
impl Unpin for CompletionKey
impl UnwindSafe for CompletionKey
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