pub struct Snapshot {
pub version: u32,
pub revision: String,
pub preset: Option<String>,
pub filter: Vec<String>,
pub exclude: Vec<String>,
}Expand description
On-disk record of the arguments that produced a cached repository.
Persisted by hf-fm download as a small JSON file at the repository’s
cache root, alongside refs/, blobs/, and snapshots/. Read back by
hf-fm status so files that don’t match the recorded preset can be
reported as FileStatus::Excluded instead of FileStatus::Missing.
Fields§
§version: u32Schema version. Equals SNAPSHOT_VERSION for newly-written files.
revision: StringGit revision at download time (resolved commit SHA or branch name).
preset: Option<String>The --preset value used at download time, if any. One of
"safetensors", "gguf", "npz", "pth", "config-only".
filter: Vec<String>--filter glob patterns used at download time. Reserved for a later
patch that adds status --filter; not yet consumed by status.
exclude: Vec<String>--exclude glob patterns used at download time. Reserved for a later
patch that adds status --exclude; not yet consumed by status.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Snapshot
impl<'de> Deserialize<'de> for Snapshot
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>,
impl Eq for Snapshot
impl StructuralPartialEq for Snapshot
Auto Trait Implementations§
impl Freeze for Snapshot
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnsafeUnpin for Snapshot
impl UnwindSafe for Snapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.