CompletedDownload

Struct CompletedDownload 

Source
pub struct CompletedDownload {
    pub primary_path: PathBuf,
    pub all_paths: Vec<PathBuf>,
    pub quantization: Quantization,
    pub repo_id: String,
    pub commit_sha: String,
    pub is_sharded: bool,
    pub total_bytes: u64,
    pub file_paths: Option<Vec<PathBuf>>,
}
Expand description

Information about a completed download for model registration.

This is a pure data transfer object containing all information needed to register a model after download completes.

Fields§

§primary_path: PathBuf

Path to the primary downloaded file (first shard for sharded models).

§all_paths: Vec<PathBuf>

All downloaded file paths (multiple for sharded models).

§quantization: Quantization

The resolved quantization.

§repo_id: String

Repository ID (e.g., “unsloth/Llama-3-GGUF”).

§commit_sha: String

Commit SHA at time of download.

§is_sharded: bool

Whether this was a sharded download.

§total_bytes: u64

Total bytes downloaded.

§file_paths: Option<Vec<PathBuf>>

Ordered list of all file paths for sharded models (None for single-file models).

Implementations§

Source§

impl CompletedDownload

Source

pub fn db_path(&self) -> &Path

Get the primary file path for database registration.

For sharded models, this returns the first shard path (required by llama-server for loading split models).

Trait Implementations§

Source§

impl Clone for CompletedDownload

Source§

fn clone(&self) -> CompletedDownload

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CompletedDownload

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.