pub struct DependencyConfig {
pub arch: Option<SystemArch>,
pub dep: DependencyName,
pub exe_name: Option<String>,
pub manager: Option<SystemPackageManager>,
pub os: Option<SystemOS>,
pub version: Option<String>,
}Expand description
Configuration for one or many system dependencies (packages).
Fields§
§arch: Option<SystemArch>Only install on this architecture.
dep: DependencyNameThe dependency name or name(s) to install.
exe_name: Option<String>The name of the executable (without ext) that this
dependency installs, and can be found when searching PATH.
manager: Option<SystemPackageManager>Only install with this package manager.
os: Option<SystemOS>Only install on this operating system.
version: Option<String>The version to install.
Implementations§
Source§impl DependencyConfig
impl DependencyConfig
Sourcepub fn get_package_names(
&self,
pm: &SystemPackageManager,
) -> Result<Vec<String>, Error>
pub fn get_package_names( &self, pm: &SystemPackageManager, ) -> Result<Vec<String>, Error>
Get a list of package names for the provided OS and package manager.
Sourcepub fn get_package_names_and_versions(
&self,
pm: &SystemPackageManager,
) -> Result<HashMap<String, Option<String>>, Error>
pub fn get_package_names_and_versions( &self, pm: &SystemPackageManager, ) -> Result<HashMap<String, Option<String>>, Error>
Get a list of package names and optional versions for the provided OS and package manager.
Sourcepub fn has_name(&self, pm: &SystemPackageManager, name: &str) -> bool
pub fn has_name(&self, pm: &SystemPackageManager, name: &str) -> bool
Return true if the current config has the provided package name.
Trait Implementations§
Source§impl Clone for DependencyConfig
impl Clone for DependencyConfig
Source§fn clone(&self) -> DependencyConfig
fn clone(&self) -> DependencyConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DependencyConfig
impl Debug for DependencyConfig
Source§impl Default for DependencyConfig
impl Default for DependencyConfig
Source§fn default() -> DependencyConfig
fn default() -> DependencyConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DependencyConfigwhere
DependencyConfig: Default,
impl<'de> Deserialize<'de> for DependencyConfigwhere
DependencyConfig: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DependencyConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DependencyConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DependencyConfig
impl PartialEq for DependencyConfig
Source§impl Serialize for DependencyConfig
impl Serialize for DependencyConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for DependencyConfig
impl StructuralPartialEq for DependencyConfig
Auto Trait Implementations§
impl Freeze for DependencyConfig
impl RefUnwindSafe for DependencyConfig
impl Send for DependencyConfig
impl Sync for DependencyConfig
impl Unpin for DependencyConfig
impl UnwindSafe for DependencyConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.