pub struct Package {Show 27 fields
pub name: String,
pub full_name: String,
pub aliases: Vec<String>,
pub oldname: Option<String>,
pub desc: Option<String>,
pub homepage: Option<String>,
pub versions: Versions,
pub urls: HashMap<String, Url>,
pub revision: usize,
pub version_scheme: usize,
pub bottle: HashMap<String, Bottle>,
pub keg_only: bool,
pub bottle_disabled: bool,
pub options: Vec<BrewOption>,
pub build_dependencies: Vec<String>,
pub dependencies: Vec<String>,
pub recommended_dependencies: Vec<String>,
pub optional_dependencies: Vec<String>,
pub uses_from_macos: Vec<MapOrString>,
pub requirements: Vec<Requirment>,
pub conflicts_with: Vec<String>,
pub caveats: Option<String>,
pub installed: Vec<Installed>,
pub linked_keg: Option<String>,
pub pinned: bool,
pub outdated: bool,
pub analytics: Option<Analytics>,
}Expand description
Represents a homebrew package, which may or may not be installed.
Fields§
§name: String§full_name: String§aliases: Vec<String>§oldname: Option<String>§desc: Option<String>§homepage: Option<String>§versions: Versions§urls: HashMap<String, Url>§revision: usize§version_scheme: usize§bottle: HashMap<String, Bottle>§keg_only: bool§bottle_disabled: bool§options: Vec<BrewOption>§build_dependencies: Vec<String>§dependencies: Vec<String>§recommended_dependencies: Vec<String>§optional_dependencies: Vec<String>§uses_from_macos: Vec<MapOrString>§requirements: Vec<Requirment>§conflicts_with: Vec<String>§caveats: Option<String>§installed: Vec<Installed>§linked_keg: Option<String>§pinned: bool§outdated: bool§analytics: Option<Analytics>Implementations§
Source§impl Package
impl Package
Sourcepub fn new(name: &str) -> Result<Package>
pub fn new(name: &str) -> Result<Package>
Creates package, filling out struct from the command line toole.
Sourcepub fn install(&self, options: &Options) -> Result<Package>
pub fn install(&self, options: &Options) -> Result<Package>
Attempts to install a package, reinstalling a package if it is already installed.
Sourcepub fn is_installed(&self) -> bool
pub fn is_installed(&self) -> bool
Check if a package is installed.
Sourcepub fn install_options(&self) -> Option<&[String]>
pub fn install_options(&self) -> Option<&[String]>
The package options that the package was installed with.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Package
impl<'de> Deserialize<'de> for Package
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 Package
impl RefUnwindSafe for Package
impl Send for Package
impl Sync for Package
impl Unpin for Package
impl UnwindSafe for Package
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