PackageSet

Struct PackageSet 

Source
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

Source

pub fn name(&self) -> &Name

Return this package set’s name.

Source

pub fn path(&self) -> &PathBuf

Return the path from which this package set was loaded.

Source

pub fn description(&self) -> &Option<String>

Return the description of this package set, if one has been provided.

Source

pub fn is_platform_match(&self) -> bool

Return true if this package is intended for the current platform, else false.

Source

pub fn platform(&self) -> Platform

Return the platform this package is intended for, None implies all.

Source

pub fn is_optional(&self) -> bool

Return true if this package set is optional, else false.

Source

pub fn env_vars(&self) -> &HashMap<String, String>

Return any environment variables the package set has declared for use in script strings.

Source

pub fn has_actions(&self) -> bool

Return true if this package set has any actions, either package or script string.

Source

pub fn actions(&self) -> &PackageSetActions

Return the actions required by this package set.

Source

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.

Source

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.

Source

pub fn env_file(&self) -> &Option<String>

Return the name of an environment file to link, if one was provided.

Source

pub fn env_file_path(&self) -> Option<PathBuf>

Return the path to the environment file to link, if one was provided.

Return a map of file names to link.

Return a map of file path s to link.

Source

pub fn run_before(&self) -> &Option<String>

Return the script string to run before any other action, if one was provided.

Source

pub fn run_after(&self) -> &Option<String>

Return the script string to run after any other action, if one was provided.

Trait Implementations§

Source§

impl Clone for PackageSet

Source§

fn clone(&self) -> PackageSet

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PackageSet

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PackageSet

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<PackageSet> for PackageSetBuilder

Source§

fn from(package: PackageSet) -> Self

Converts to this type from the input type.
Source§

impl From<PackageSetBuilder> for PackageSet

Source§

fn from(builder: PackageSetBuilder) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for PackageSet

Source§

fn eq(&self, other: &PackageSet) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for PackageSet

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for PackageSet

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,