pub enum ReadOutcome {
Found(ContentHash),
Absent,
Refused,
}Expand description
What a tracked read found.
Three states rather than an Option<ContentHash>, because a refusal is not an absence.
A path refused for resolving out of the root through a symlink — node_modules/pkg as
pnpm links it — was recorded as absent, and a validator checking absence reads
root.join(path) and follows the link: the file is there, so the dependency reads as
“appeared”, every importer of a store-linked package misses the cache on every run, and
the validator has read bytes outside the project root to decide it. Recording the refusal
as itself is what lets the validator reproduce the decision that was actually made.
Variants§
Found(ContentHash)
The file was read, and hashed to this.
Absent
Nothing readable was there.
A recorded answer, not a missing record. See the module documentation.
Refused
It resolved outside the root through a symlink, so it was refused unread.
Still a dependency: the answer that rested on the refusal has to be reconsidered the day the path becomes a real in-root file.
Trait Implementations§
Source§impl Clone for ReadOutcome
impl Clone for ReadOutcome
Source§fn clone(&self) -> ReadOutcome
fn clone(&self) -> ReadOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more