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.
Trait Implementations§
Source§impl Clone for ProducedFiles
impl Clone for ProducedFiles
Source§fn clone(&self) -> ProducedFiles
fn clone(&self) -> ProducedFiles
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProducedFiles
impl Debug for ProducedFiles
Source§impl Default for ProducedFiles
impl Default for ProducedFiles
Source§fn default() -> ProducedFiles
fn default() -> ProducedFiles
Auto Trait Implementations§
impl Forget for ProducedFiles
impl Freeze for ProducedFileswhere
*const ArcInner<RwLock<HashMap<String, ProducedFile>>> is !null: Freeze,
PhantomData<ArcInner<RwLock<HashMap<String, ProducedFile>>>>: Freeze,
impl Move for ProducedFiles
impl RefUnwindSafe for ProducedFiles
impl Send for ProducedFiles
impl Sync for ProducedFiles
impl Unpin for ProducedFiles
impl UnsafeUnpin for ProducedFileswhere
*const ArcInner<RwLock<HashMap<String, ProducedFile>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<HashMap<String, ProducedFile>>>>: UnsafeUnpin,
impl UnwindSafe for ProducedFiles
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more