pub struct ProducedFiles(/* private fields */);Expand description
The files a request’s own work produced, shared by every run of its
tree, from evidence rather than anyone’s account of them: a capture a
tool noted as it saved it, and a file a succeeded call created where
its declared write found nothing before (Self::claim_created, the
file counterpart of OwnedFolders::claim_created). Each is the
request’s own artifact wherever it is saved (a capture lands in the
daemon’s inbox, outside any project). Keyed by the resolved path, and a
capture also by its resource id, so either handle a later call names
finds it. A planning and effect fact, never a trust source for what the
file holds.
Implementations§
Source§impl ProducedFiles
impl ProducedFiles
Sourcepub fn note_capture(
&self,
path: &str,
resource_id: Option<&str>,
kind: &DeliverableKind,
)
pub fn note_capture( &self, path: &str, resource_id: Option<&str>, kind: &DeliverableKind, )
A capture was saved at path (with resource_id, when it has one)
and shows kind.
Sourcepub fn note_created(&self, path: &str, resource_id: Option<&str>)
pub fn note_created(&self, path: &str, resource_id: Option<&str>)
A tool of the request made the file at path itself (with
resource_id, when it has one): a generated image saved to the
daemon’s inbox. A capture already noted keeps what it shows.
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, OwnedFolders::absent_write_targets),
each path that is now a regular file was made by this request’s
work. A file that existed before never joins, and a capture already
noted keeps what it shows. Returns what it claimed.
Sourcepub fn get(&self, target: &str) -> Option<ProducedFile>
pub fn get(&self, target: &str) -> Option<ProducedFile>
What the request’s work produced at target (a path, or a
capture’s resource id), when it produced it.
Sourcepub fn capture_kind(&self, path: &str) -> Option<DeliverableKind>
pub fn capture_kind(&self, path: &str) -> Option<DeliverableKind>
What the capture saved at path shows, when one was noted: a later
send_file of that path delivers that kind, not a file of its own.
Sourcepub fn entries(&self) -> Vec<(String, ProducedFile)>
pub fn entries(&self) -> Vec<(String, ProducedFile)>
Every handle noted, each a path or a capture’s resource id, with what it is.
Sourcepub fn named_by(&self, named: &[String]) -> Vec<(String, ProducedFile)>
pub fn named_by(&self, named: &[String]) -> Vec<(String, ProducedFile)>
Of the files and resources a call names (its
ToolSemantics::named_files), the ones this request’s work
produced, each as named.