pub struct QueuedDownload {Show 15 fields
pub id: String,
pub model_id: String,
pub quantization: Option<Quantization>,
pub display_name: String,
pub status: DownloadStatus,
pub position: u32,
pub downloaded_bytes: u64,
pub total_bytes: u64,
pub speed_bps: f64,
pub eta_seconds: Option<f64>,
pub progress_percent: f64,
pub queued_at: u64,
pub started_at: Option<u64>,
pub group_id: Option<String>,
pub shard_info: Option<ShardInfo>,
}Expand description
A single download in the queue.
Fields§
§id: StringCanonical ID (model_id:quantization or model_id).
model_id: StringFull model ID (e.g., “TheBloke/Llama-2-7B-GGUF”).
quantization: Option<Quantization>Resolved quantization (if specified).
display_name: StringHuman-readable display name.
status: DownloadStatusCurrent status.
position: u32Position in queue (1-based; 1 = active, 2+ = waiting).
downloaded_bytes: u64Bytes downloaded so far.
total_bytes: u64Total bytes to download.
speed_bps: f64Download speed in bytes per second.
eta_seconds: Option<f64>Estimated time remaining.
progress_percent: f64Progress as percentage (0.0 - 100.0).
queued_at: u64Timestamp when download was queued (Unix epoch seconds).
started_at: Option<u64>Timestamp when download started (Unix epoch seconds).
group_id: Option<String>Group ID for sharded downloads.
shard_info: Option<ShardInfo>Shard information if this is part of a sharded download.
Implementations§
Source§impl QueuedDownload
impl QueuedDownload
Sourcepub fn new(
id: impl Into<String>,
model_id: impl Into<String>,
display_name: impl Into<String>,
position: u32,
queued_at: u64,
) -> Self
pub fn new( id: impl Into<String>, model_id: impl Into<String>, display_name: impl Into<String>, position: u32, queued_at: u64, ) -> Self
Create a new queued download in initial state.
Sourcepub const fn with_quantization(self, quant: Quantization) -> Self
pub const fn with_quantization(self, quant: Quantization) -> Self
Set the quantization.
Sourcepub const fn with_status(self, status: DownloadStatus) -> Self
pub const fn with_status(self, status: DownloadStatus) -> Self
Set the download status.
Sourcepub fn with_shard_info(self, group_id: String, shard_info: ShardInfo) -> Self
pub fn with_shard_info(self, group_id: String, shard_info: ShardInfo) -> Self
Set shard information.
Sourcepub fn update_progress(&mut self, downloaded: u64, total: u64, speed_bps: f64)
pub fn update_progress(&mut self, downloaded: u64, total: u64, speed_bps: f64)
Update progress from bytes downloaded.
Sourcepub const fn is_complete(&self) -> bool
pub const fn is_complete(&self) -> bool
Check if this download is complete.
Sourcepub fn speed_display(&self) -> String
pub fn speed_display(&self) -> String
Get formatted speed string (e.g., “5.2 MB/s”).
Sourcepub fn eta_display(&self) -> Option<String>
pub fn eta_display(&self) -> Option<String>
Get formatted ETA string (e.g., “2m 30s”).
Trait Implementations§
Source§impl Clone for QueuedDownload
impl Clone for QueuedDownload
Source§fn clone(&self) -> QueuedDownload
fn clone(&self) -> QueuedDownload
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more