pub struct Cask {Show 17 fields
pub token: String,
pub name: Option<Vec<String>>,
pub version: Option<String>,
pub desc: Option<String>,
pub homepage: Option<String>,
pub artifacts: Option<Vec<Artifact>>,
pub url: Option<UrlField>,
pub url_specs: Option<HashMap<String, Value>>,
pub sha256: Option<Sha256Field>,
pub appcast: Option<Appcast>,
pub auto_updates: Option<bool>,
pub depends_on: Option<DependsOn>,
pub conflicts_with: Option<ConflictsWith>,
pub caveats: Option<String>,
pub stage_only: Option<bool>,
pub uninstall: Option<HashMap<String, Value>>,
pub zap: Option<Vec<ZapStanza>>,
}
Expand description
The main Cask model matching Homebrew JSON v2
Fields§
§token: String
§name: Option<Vec<String>>
§version: Option<String>
§desc: Option<String>
§homepage: Option<String>
§artifacts: Option<Vec<Artifact>>
§url: Option<UrlField>
§url_specs: Option<HashMap<String, Value>>
§sha256: Option<Sha256Field>
§appcast: Option<Appcast>
§auto_updates: Option<bool>
§depends_on: Option<DependsOn>
§conflicts_with: Option<ConflictsWith>
§caveats: Option<String>
§stage_only: Option<bool>
§uninstall: Option<HashMap<String, Value>>
§zap: Option<Vec<ZapStanza>>
Implementations§
Source§impl Cask
impl Cask
Sourcepub fn is_installed(&self, config: &Config) -> bool
pub fn is_installed(&self, config: &Config) -> bool
Check if this cask is installed by looking for a manifest file in any versioned directory within the Caskroom.
Sourcepub fn installed_version(&self, config: &Config) -> Option<String>
pub fn installed_version(&self, config: &Config) -> Option<String>
Get the installed version of this cask by reading the directory names in the Caskroom. Returns the first version found (use cautiously if multiple versions could exist, though current install logic prevents this).
Sourcepub fn display_name(&self) -> String
pub fn display_name(&self) -> String
Get a friendly name for display purposes
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Cask
impl<'de> Deserialize<'de> for Cask
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Cask
impl RefUnwindSafe for Cask
impl Send for Cask
impl Sync for Cask
impl Unpin for Cask
impl UnwindSafe for Cask
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more