pub struct InstalledAsset {
pub id: String,
pub kind: AssetKind,
pub digest: String,
pub fetched_at: String,
pub files: Option<usize>,
pub published_at: Option<String>,
}Expand description
What was recorded about an asset when it was provisioned.
Persisted beside the asset as installed.json, so status reports what was
actually verified rather than re-deriving it and hoping the answer matches.
Fields§
§id: StringThe asset id.
kind: AssetKindWhat it is.
digest: StringSHA-256 of the asset as installed. For a directory it is a digest over
the sorted (relative path, content digest) list, so it changes when any
file in the tree changes and does not depend on directory iteration
order.
fetched_at: StringWhen prefetch verified and recorded it, RFC 3339 UTC.
files: Option<usize>How many files the digest covers, for a directory asset.
published_at: Option<String>When the asset’s contents were published, RFC 3339 UTC — for an advisory
database that is a git checkout, its HEAD commit time.
This is not fetched_at. Fetching an eight-month-old database today
does not make it current, and the difference between the two is exactly
what a possibly stale label is about.
It is recorded here because the analyzer will not report it: cargo audit
returns last-commit: null and last-updated: null whenever it is
pointed at a database with --db instead of resolving one itself —
verified against cargo-audit 0.22.2, at both a shallow clone and its own
managed checkout. Pinning the database is what makes a run reproducible,
so the pinned configuration must not be the one that loses the staleness
evidence.
Trait Implementations§
Source§impl Clone for InstalledAsset
impl Clone for InstalledAsset
Source§fn clone(&self) -> InstalledAsset
fn clone(&self) -> InstalledAsset
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InstalledAsset
impl Debug for InstalledAsset
Source§impl<'de> Deserialize<'de> for InstalledAsset
impl<'de> Deserialize<'de> for InstalledAsset
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 InstalledAsset
Source§impl PartialEq for InstalledAsset
impl PartialEq for InstalledAsset
Source§impl Serialize for InstalledAsset
impl Serialize for InstalledAsset
impl StructuralPartialEq for InstalledAsset
Auto Trait Implementations§
impl Freeze for InstalledAsset
impl RefUnwindSafe for InstalledAsset
impl Send for InstalledAsset
impl Sync for InstalledAsset
impl Unpin for InstalledAsset
impl UnsafeUnpin for InstalledAsset
impl UnwindSafe for InstalledAsset
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.