pub struct ExpandedFile {
pub relative_path: PathBuf,
pub content: Vec<u8>,
pub is_dir: bool,
pub tracked_render: Option<String>,
pub context_hash: Option<[u8; 32]>,
}Expand description
A single file produced by a preprocessor’s expansion.
Construct ad-hoc via the struct literal; tests commonly use
ExpandedFile { relative_path, content, ..Default::default() } to
fill in the optional cache-related fields.
Fields§
§relative_path: PathBufPath relative to the expansion output (usually just the filename).
content: Vec<u8>The file content.
is_dir: boolWhether this entry is a directory marker.
tracked_render: Option<String>Marker-annotated rendered output, populated by Generative
preprocessors that support cache-backed reverse-diff (templates).
None for Representational, Opaque, or generative preprocessors
that don’t track variable boundaries (e.g. unarchive).
When present, the pipeline persists this string in the baseline
cache so the clean filter and dodot transform check can compute
reverse-diffs without re-rendering — the latter being important
because re-rendering can re-trigger secret-provider auth prompts.
context_hash: Option<[u8; 32]>SHA-256 of the rendering context (variables, env values resolved
at render time). None for preprocessors that don’t have a
meaningful context concept.
The pipeline pairs this with the source-file hash and rendered
content hash in the baseline cache. dodot up re-rendering and
install/homebrew sentinels both use the context hash to decide
when work is stale.
Trait Implementations§
Source§impl Clone for ExpandedFile
impl Clone for ExpandedFile
Source§fn clone(&self) -> ExpandedFile
fn clone(&self) -> ExpandedFile
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more