pub struct GraphCacheFile {
pub key: StableFileKey,
pub file_id: FileId,
pub content_hash: u64,
pub resolve_hash: u64,
}Expand description
Source freshness for one file in a graph-cache manifest.
Fields§
§key: StableFileKeyPersistable identity for the file.
file_id: FileIdCurrent in-memory identifier for the file.
The stable key is the durable identity, but the persisted ModuleGraph
is still FileId-keyed. Until a future graph-cache format remaps graph
edges through stable keys, a changed assignment must miss rather than
trust a graph whose modules[file_id] indexes point at different files.
content_hash: u64xxh3 hash of the parsed source content.
Content, not (mtime, size): the metadata pair is writer-controlled and
a same-length rewrite with a restored mtime leaves it unchanged, so a
metadata-keyed manifest can hand back the previous run’s graph for a
tree that no longer matches it. The hash is free here because the parse
stage already computed it, and unlike a ctime it survives cp -Rp and
CI cache restores, which is what makes a warm graph reusable across
checkouts at all.
0 when the run produced no module for the file (an unreadable source).
resolve_hash: u64Hash of the facts of the file that import resolution reads (see
resolve_hash.rs). An edit that keeps this hash for every file
keeps every resolved import, so the resolver payload stays valid while
the graph is built again from the new modules.
0 when the run produced no module for the file. Equal to content_hash for a project with auto-import rules,
where resolution also reads facts that the hash does not cover.
Trait Implementations§
Source§impl Clone for GraphCacheFile
impl Clone for GraphCacheFile
Source§impl Debug for GraphCacheFile
impl Debug for GraphCacheFile
Source§impl<'de> Deserialize<'de> for GraphCacheFile
impl<'de> Deserialize<'de> for GraphCacheFile
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 GraphCacheFile
Source§impl Hash for GraphCacheFile
impl Hash for GraphCacheFile
Source§impl PartialEq for GraphCacheFile
impl PartialEq for GraphCacheFile
Source§impl Serialize for GraphCacheFile
impl Serialize for GraphCacheFile
impl StructuralPartialEq for GraphCacheFile
Auto Trait Implementations§
impl Forget for GraphCacheFile
impl Freeze for GraphCacheFile
impl Move for GraphCacheFile
impl RefUnwindSafe for GraphCacheFile
impl Send for GraphCacheFile
impl Sync for GraphCacheFile
impl Unpin for GraphCacheFile
impl UnsafeUnpin for GraphCacheFile
impl UnwindSafe for GraphCacheFile
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§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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more