Skip to main content

module_to_cached

Function module_to_cached 

Source
pub fn module_to_cached(
    module: &ModuleInfo,
    fingerprint: SourceFingerprint,
    extracted: ParseNeeds,
) -> CachedModule
Expand description

Convert a ModuleInfo to a CachedModule for storage.

The SourceFingerprint comes from std::fs::metadata() at parse time and enables fast cache validation on subsequent runs.

extracted names the optional facts that the run parsed the module with. The entry records each of them as present. A run that reads no call facts does not pay their encode, and the entry records that the facts are absent.