pub struct CrateMetadata {
pub published_days_ago: Option<u64>,
pub total_downloads: Option<u64>,
pub recent_downloads: Option<u64>,
pub owners: Vec<String>,
}Expand description
Registry metadata for one crate, gathered by the caller (CLI) from the crates.io API and injected so the core stays network- and clock-free.
This is what lets rustinel reason about trust and freshness — signals a purely advisory-database-driven tool (cargo-audit) cannot produce, because they exist before any advisory is ever filed.
Fields§
§published_days_ago: Option<u64>Age in days of the locked version at analysis time (caller computes it
from the version’s created_at against the wall clock). None when the
metadata could not be fetched.
total_downloads: Option<u64>All-time download count for the crate. Low counts mark obscure, unvetted dependencies; high counts vouch for an established crate.
recent_downloads: Option<u64>Recent (90-day) download count.
owners: Vec<String>crates.io owner logins (users and teams) for the crate.
Trait Implementations§
Source§impl Clone for CrateMetadata
impl Clone for CrateMetadata
Source§fn clone(&self) -> CrateMetadata
fn clone(&self) -> CrateMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CrateMetadata
impl Debug for CrateMetadata
Source§impl Default for CrateMetadata
impl Default for CrateMetadata
Source§fn default() -> CrateMetadata
fn default() -> CrateMetadata
Returns the “default value” for a type. Read more
impl Eq for CrateMetadata
Source§impl PartialEq for CrateMetadata
impl PartialEq for CrateMetadata
Source§fn eq(&self, other: &CrateMetadata) -> bool
fn eq(&self, other: &CrateMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CrateMetadata
Auto Trait Implementations§
impl Freeze for CrateMetadata
impl RefUnwindSafe for CrateMetadata
impl Send for CrateMetadata
impl Sync for CrateMetadata
impl Unpin for CrateMetadata
impl UnsafeUnpin for CrateMetadata
impl UnwindSafe for CrateMetadata
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
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
Compare self to
key and return true if they are equal.