pub struct Resolution {
pub quantization: Quantization,
pub files: Vec<ResolvedFile>,
pub is_sharded: bool,
}Expand description
Result of resolving files for a quantization.
Fields§
§quantization: QuantizationThe resolved quantization type.
files: Vec<ResolvedFile>List of files to download (sorted for sharded files).
is_sharded: boolWhether this is a sharded (multi-part) download.
Implementations§
Source§impl Resolution
impl Resolution
Sourcepub fn total_size(&self) -> Option<u64>
pub fn total_size(&self) -> Option<u64>
Get total size if all file sizes are known.
Sourcepub fn first_file(&self) -> Option<&str>
pub fn first_file(&self) -> Option<&str>
Get the first file path (used for database registration of sharded models).
Sourcepub const fn file_count(&self) -> usize
pub const fn file_count(&self) -> usize
Get the number of files.
Trait Implementations§
Source§impl Clone for Resolution
impl Clone for Resolution
Source§fn clone(&self) -> Resolution
fn clone(&self) -> Resolution
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 Resolution
impl Debug for Resolution
Source§impl<'de> Deserialize<'de> for Resolution
impl<'de> Deserialize<'de> for Resolution
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 Resolution
impl RefUnwindSafe for Resolution
impl Send for Resolution
impl Sync for Resolution
impl Unpin for Resolution
impl UnwindSafe for Resolution
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