pub struct Pack {
pub name: String,
pub display_name: String,
pub path: PathBuf,
pub config: HandlerConfig,
}Expand description
A dotfile pack — a directory of related configuration files.
Fields§
§name: StringOn-disk directory name (e.g. "vim", "010-nvim"). This is the
sort key that drives cross-pack ordering, and the identity used
by every internal surface (datastore subtree, sentinel keys,
path resolution).
display_name: StringUser-facing pack name. For unprefixed packs this equals
name; for packs whose directory matches the
^(\d+)[-_](.+)$ ordering grammar, this is the portion after
the separator (e.g. 010-nvim → nvim). Used by every
user-facing surface: dodot status, dodot list, error
messages, generated shell-init comments, log lines, CLI
argument resolution.
path: PathBufAbsolute path to the pack directory.
config: HandlerConfigHandler-relevant configuration for this pack (merged from app defaults + root config + pack config).
Implementations§
Source§impl Pack
impl Pack
Sourcepub fn new(name: String, path: PathBuf, config: HandlerConfig) -> Self
pub fn new(name: String, path: PathBuf, config: HandlerConfig) -> Self
Construct a Pack from its on-disk directory name. Derives
display_name by stripping a recognised
numeric prefix (010-foo → foo); for names without a prefix,
display_name == name.
Pack name validation (alphanumerics, _, -, .) is the
caller’s responsibility — typically scan_packs.