pub struct Delivery {
pub cache: CachePolicy,
pub stale_ok: bool,
pub cache_path: Option<PathBuf>,
pub accept_partial: bool,
pub watch: Option<WatchDelivery>,
pub workers: Workers,
pub batch_size: usize,
pub order: ScanOrder,
}Expand description
How a request is carried out, which never changes what its answer says.
No Default, deliberately. Every field here is a decision its caller has already made,
and the cache policy is the one that decides whether an answer touches the filesystem
and whether it leaves a trace; a default one reads cache: Auto whatever the caller
asked for, which is exactly how the watch session came to validate against a cache
policy nobody had chosen and WatchCacheOnly became unreachable inside the engine
(fdu-i18y). A caller that wants the ordinary delivery names it.
Fields§
§cache: CachePolicyHow the snapshot cache may be used.
stale_ok: boolAnswer from the snapshot alone, without touching the tree.
The one delivery whose answer can be stale, and it says so: the report’s
provenance is cache_only and its freshness stale. It fails when no usable
snapshot exists rather than quietly scanning, because a fast path that is sometimes
a full walk, with nothing in the output to say which happened, is worse than none.
It writes nothing, and it is refused with CachePolicy::Off, with a watch, and
by a refresh, none of which can take an unverified snapshot as their answer.
cache_path: Option<PathBuf>Where the snapshot for this root lives, or None for no cache at all.
accept_partial: boolWhether a partial answer is accepted as a success.
watch: Option<WatchDelivery>Whether the answer repeats as a watch, and how.
workers: WorkersDirectory and content reader workers.
batch_size: usizeMaximum operations in one scanner batch.
order: ScanOrderDirectory traversal scheduling.