pub struct OwnedFolders(/* private fields */);Expand description
The folders a request’s work made fresh for itself (a spawn’s
new_folders, claimed empty by the runtime), shared by every run of the
request’s tree. Everything inside them is the work’s own: a change or a
delete there acts on nothing anyone else made. A planning and effect
fact only, never a trust source for what is read there (a package
manager fills them with other people’s code).
Implementations§
Source§impl OwnedFolders
impl OwnedFolders
Sourcepub fn claim(&self, folders: &[String])
pub fn claim(&self, folders: &[String])
Record folders the runtime just made for this request’s work.
Sourcepub fn release<P: AsRef<Path>>(&self, folders: &[P])
pub fn release<P: AsRef<Path>>(&self, folders: &[P])
Give back folders that were removed again (the work never started).
Sourcepub fn absent_write_targets(effects: &CallEffects) -> Vec<PathBuf>
pub fn absent_write_targets(effects: &CallEffects) -> Vec<PathBuf>
Where a call’s declared writes land that does not exist yet, taken
just before it runs: what it may create. Once it succeeded,
Self::claim_created claims each that it did create as a folder.
Sourcepub fn claim_created(&self, absent: &[PathBuf]) -> Vec<String>
pub fn claim_created(&self, absent: &[PathBuf]) -> Vec<String>
Ownership from evidence of creation: of absent (taken before a
call that then succeeded), each path that is now a folder was made
by this request’s work (mkdir, a project tool’s init in a new
path), so it joins the request’s owned folders, as a spawn’s
declared new_folders do (live 2026-11-13: two helpers each created
their site’s folder without declaring it, and every later change
there was judged as someone else’s project). A folder that existed
before never joins. Returns what it claimed.