pub struct RuleMatch {
pub relative_path: PathBuf,
pub absolute_path: PathBuf,
pub pack: String,
pub handler: String,
pub is_dir: bool,
pub options: HashMap<String, String>,
pub preprocessor_source: Option<PathBuf>,
pub rendered_bytes: Option<Arc<[u8]>>,
}Expand description
A file that matched a rule during pack scanning.
Fields§
§relative_path: PathBufPath relative to the pack root (e.g. "vimrc", "nvim/init.lua").
absolute_path: PathBufAbsolute path to the file.
pack: StringName of the pack this file belongs to.
handler: StringName of the handler that should process this file.
is_dir: boolWhether this entry is a directory.
options: HashMap<String, String>Handler-specific options from the matched rule.
preprocessor_source: Option<PathBuf>If this file was produced by a preprocessor, the original source path.
None for regular (non-preprocessed) files.
rendered_bytes: Option<Arc<[u8]>>In-memory rendered bytes for preprocessor-produced files.
Populated by plan_pack_inner from
PreprocessResult.rendered_bytes so that handlers needing
the rendered content for sentinel hashing (install,
homebrew) can hash these bytes directly instead of reading
the rendered file from disk. That decoupling is the
structural enabler for §7.4 Passive mode (dodot status,
up --dry-run), where the rendered file is intentionally
not written to disk. See issue #121.
None for regular (non-preprocessed) files; handlers
targeting those still read from absolute_path directly.
Arc<[u8]> so cloning a RuleMatch (e.g. during handler
grouping) doesn’t duplicate the buffer.