pub struct PrefetchCandidate {
pub cache_key: String,
pub crate_name: String,
pub compile_time_ms: Option<u64>,
pub size_bytes: Option<u64>,
pub source: CandidateSource,
pub demand_index: Option<u32>,
}Fields§
§cache_key: String§crate_name: String§compile_time_ms: Option<u64>What a miss would cost to rebuild. None = unknown, which is NOT the
same as zero: an un-backfilled store row reads 0, and treating that as
“free to fetch and worthless to have” would bury it (#617).
size_bytes: Option<u64>Stored artifact size. An admission and ranking ESTIMATE, never a promise about compressed transfer bytes: anything enforced has to be counted on the wire.
source: CandidateSource§demand_index: Option<u32>Position in the build’s dependency order, i.e. roughly when the build
will ask for it. None = not in the intent’s crate list.
Implementations§
Source§impl PrefetchCandidate
impl PrefetchCandidate
Sourcepub fn new(cache_key: String, crate_name: String) -> Self
pub fn new(cache_key: String, crate_name: String) -> Self
A candidate with no metadata, as the pre-#617 wire produced.
pub fn with_source(self, source: CandidateSource) -> Self
Trait Implementations§
Source§impl Clone for PrefetchCandidate
impl Clone for PrefetchCandidate
Source§fn clone(&self) -> PrefetchCandidate
fn clone(&self) -> PrefetchCandidate
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 PrefetchCandidate
impl Debug for PrefetchCandidate
Source§impl<'de> Deserialize<'de> for PrefetchCandidate
impl<'de> Deserialize<'de> for PrefetchCandidate
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
impl Eq for PrefetchCandidate
Source§impl PartialEq for PrefetchCandidate
impl PartialEq for PrefetchCandidate
Source§impl Serialize for PrefetchCandidate
impl Serialize for PrefetchCandidate
impl StructuralPartialEq for PrefetchCandidate
Auto Trait Implementations§
impl Freeze for PrefetchCandidate
impl RefUnwindSafe for PrefetchCandidate
impl Send for PrefetchCandidate
impl Sync for PrefetchCandidate
impl Unpin for PrefetchCandidate
impl UnsafeUnpin for PrefetchCandidate
impl UnwindSafe for PrefetchCandidate
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