pub struct Checks<'a> {
pub prefix: &'a str,
pub usable: &'a dyn Fn(&ResourceName) -> bool,
pub vouch: &'a dyn Fn(&Request, &ResourceName, &str) -> bool,
pub on_disk: Option<OnDisk<'a>>,
pub cache: &'a str,
pub warn: &'a dyn Fn(String),
}Expand description
What the caller knows of the destination directory.
Fields§
§prefix: &'a strPerl’s resource_prefix (x unless set).
usable: &'a dyn Fn(&ResourceName) -> boolWhether a name may be written: a copy’s kept path outside this run’s site directory may not.
vouch: &'a dyn Fn(&Request, &ResourceName, &str) -> boolWhether name, owned by the source at source (relative to the destination directory), is the name that source
takes and the source holds the request’s bytes: another source’s kept path or stem a request may share. Only a
relative path to a regular file is read.
on_disk: Option<OnDisk<'a>>Whether a file of the name exists in the destination directory that the request may not write, asked of a name
the store does not know: the store may not know every file earlier runs wrote (a deleted cache, an unusable one).
None for a store in memory from the start (--nocache), whose names restart and overwrite as Perl’s do.
cache: &'a strThe cache file a Warning names.
warn: &'a dyn Fn(String)Report a Warning (unexpected, cache): the caller emits it once the transaction is done, as a transaction run
again in memory meets the same entries.