pub struct PackageSet { /* private fields */ }
Expand description
A Package set brings together a set of package actions, with additional actions such as linking files, adding an env-file, and run before/after script strings.
Implementations§
Source§impl PackageSet
impl PackageSet
Sourcepub fn description(&self) -> &Option<String>
pub fn description(&self) -> &Option<String>
Return the description of this package set, if one has been provided.
Sourcepub fn is_platform_match(&self) -> bool
pub fn is_platform_match(&self) -> bool
Return true
if this package is intended for the current platform, else false
.
Sourcepub fn platform(&self) -> Platform
pub fn platform(&self) -> Platform
Return the platform this package is intended for, None
implies all.
Sourcepub fn is_optional(&self) -> bool
pub fn is_optional(&self) -> bool
Return true
if this package set is optional, else false
.
Sourcepub fn env_vars(&self) -> &HashMap<String, String>
pub fn env_vars(&self) -> &HashMap<String, String>
Return any environment variables the package set has declared for use in script strings.
Sourcepub fn has_actions(&self) -> bool
pub fn has_actions(&self) -> bool
Return true
if this package set has any actions, either package or script string.
Sourcepub fn actions(&self) -> &PackageSetActions
pub fn actions(&self) -> &PackageSetActions
Return the actions required by this package set.
Sourcepub fn packages(&self) -> Option<impl Iterator<Item = &Package>>
pub fn packages(&self) -> Option<impl Iterator<Item = &Package>>
Return all the packages to install for this package set, or None
if script strings have
been provided instead.
Sourcepub fn scripts(&self) -> Option<&HashMap<InstallActionKind, String>>
pub fn scripts(&self) -> Option<&HashMap<InstallActionKind, String>>
Return all the script strings to execute for this package set, or None
if packages have
been provided instead.
Sourcepub fn env_file(&self) -> &Option<String>
pub fn env_file(&self) -> &Option<String>
Return the name of an environment file to link, if one was provided.
Sourcepub fn env_file_path(&self) -> Option<PathBuf>
pub fn env_file_path(&self) -> Option<PathBuf>
Return the path to the environment file to link, if one was provided.
Sourcepub fn link_files(&self) -> &HashMap<String, String>
pub fn link_files(&self) -> &HashMap<String, String>
Return a map of file names to link.
Sourcepub fn link_file_paths(&self) -> Vec<(PathBuf, PathBuf)>
pub fn link_file_paths(&self) -> Vec<(PathBuf, PathBuf)>
Return a map of file path s to link.
Sourcepub fn run_before(&self) -> &Option<String>
pub fn run_before(&self) -> &Option<String>
Return the script string to run before any other action, if one was provided.
Trait Implementations§
Source§impl Clone for PackageSet
impl Clone for PackageSet
Source§fn clone(&self) -> PackageSet
fn clone(&self) -> PackageSet
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more