Skip to main content

load_module_for_key

Function load_module_for_key 

Source
pub fn load_module_for_key(
    source_path: &Path,
    key: CacheKey,
) -> ModuleLookupOutcome
Expand description

As load_module, but for a key already known without reading the source.

artifact is None when nothing is stored under key — including when it was evicted from the shared cache directory. A known key is a shortcut to an artifact, not a promise that one exists, so a caller that gets None must fall back to reading and compiling.