pub struct CaskInfo {
pub token: String,
pub name: Vec<String>,
pub artifacts: Vec<Value>,
pub installed: Option<String>,
}Expand description
Minimal subset of brew info --json=v2 --cask <token> we read.
The full JSON shape is large and brew owns it; we deserialise only
the fields the proposal calls out and tolerate everything else via
#[serde(default)] so a brew schema bump doesn’t break the probe.
Fields§
§token: StringCask token (e.g. "visual-studio-code").
name: Vec<String>Human-readable display name ("Visual Studio Code").
artifacts: Vec<Value>Bundle filenames declared by the cask’s app artifact (e.g.
["Visual Studio Code.app"]).
installed: Option<String>Whether the cask is currently installed locally. The brew JSON
reports this via the installed field on each cask entry.
Implementations§
Source§impl CaskInfo
impl CaskInfo
Sourcepub fn app_support_candidates(&self) -> Vec<String>
pub fn app_support_candidates(&self) -> Vec<String>
Extract leaf names of ~/Library/Application Support/<X> paths
declared in the cask’s zap stanza. Each is a candidate
app-support folder name for matching against an _app/<X>/
pack entry.
Sourcepub fn preferences_plists(&self) -> Vec<String>
pub fn preferences_plists(&self) -> Vec<String>
Preferences plist paths declared in the zap stanza. Used by
dodot adopt to suggest sibling adoptions
(~/Library/Preferences/<bundle-id>.plist).
Sourcepub fn app_bundle_name(&self) -> Option<String>
pub fn app_bundle_name(&self) -> Option<String>
.app bundle leaf name from the cask’s app artifact, e.g.
"Visual Studio Code.app". Used to drive mdls lookups.