pub struct PinnedFile {
pub name: &'static str,
pub sha256: &'static str,
pub size: u64,
}Expand description
One file of a pinned model snapshot: its name inside the repo plus the exact size and SHA-256 it must have.
Pinning makes a download verifiable independent of where the bytes
came from, which is what lets download_pinned_to_cache fall back
to a mirror without trusting it.
Fields§
§name: &'static strFilename inside the repo.
sha256: &'static strLowercase hex SHA-256 of the file’s contents.
size: u64Exact size in bytes.
Trait Implementations§
Source§impl Clone for PinnedFile
impl Clone for PinnedFile
impl Copy for PinnedFile
Source§impl Debug for PinnedFile
impl Debug for PinnedFile
impl Eq for PinnedFile
Source§impl PartialEq for PinnedFile
impl PartialEq for PinnedFile
impl StructuralPartialEq for PinnedFile
Auto Trait Implementations§
impl Freeze for PinnedFile
impl RefUnwindSafe for PinnedFile
impl Send for PinnedFile
impl Sync for PinnedFile
impl Unpin for PinnedFile
impl UnsafeUnpin for PinnedFile
impl UnwindSafe for PinnedFile
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