pub struct PackageCreationConfig {
package_input: PackageInput,
output_dir: OutputDir,
compression: CompressionSettings,
}Expand description
A config that tracks the components needed for the creation of an alpm-package from input directory.
Tracks a PackageInput, optional CompressionSettings and an OutputDir in which an
alpm-package is placed after creation.
Fields§
§package_input: PackageInput§output_dir: OutputDir§compression: CompressionSettingsImplementations§
Source§impl PackageCreationConfig
impl PackageCreationConfig
Sourcepub fn new(
package_input: PackageInput,
output_dir: OutputDir,
compression: CompressionSettings,
) -> Result<Self, Error>
pub fn new( package_input: PackageInput, output_dir: OutputDir, compression: CompressionSettings, ) -> Result<Self, Error>
Creates a new PackageCreationConfig.
§Errors
Returns an error if
package_input.input_diris equal tooutput_dir,package_input.input_diris located inside ofoutput_dir,- or
output_diris located inside ofpackage_input.input_dir.
Sourcepub fn package_input(&self) -> &PackageInput
pub fn package_input(&self) -> &PackageInput
Returns a reference to the PackageInput.
Sourcepub fn output_dir(&self) -> &OutputDir
pub fn output_dir(&self) -> &OutputDir
Returns a reference to the OutputDir.
Sourcepub fn compression(&self) -> &CompressionSettings
pub fn compression(&self) -> &CompressionSettings
Returns a reference to the CompressionSettings.
Trait Implementations§
Source§impl Clone for PackageCreationConfig
impl Clone for PackageCreationConfig
Source§fn clone(&self) -> PackageCreationConfig
fn clone(&self) -> PackageCreationConfig
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 PackageCreationConfig
impl Debug for PackageCreationConfig
Source§impl From<&PackageCreationConfig> for PackageFileName
impl From<&PackageCreationConfig> for PackageFileName
Source§fn from(value: &PackageCreationConfig) -> Self
fn from(value: &PackageCreationConfig) -> Self
Creates a PackageFileName from a PackageCreationConfig reference.
Source§impl TryFrom<&PackageCreationConfig> for Package
impl TryFrom<&PackageCreationConfig> for Package
Source§fn try_from(value: &PackageCreationConfig) -> Result<Self, Self::Error>
fn try_from(value: &PackageCreationConfig) -> Result<Self, Self::Error>
Creates a new Package from a PackageCreationConfig.
Before creating a Package, guarantees the on-disk file consistency with the
help of available Mtree data.
§Errors
Returns an error if
- creating a
TarballBuilderfails, - creating a compressed or uncompressed package file fails,
- validating any of the paths using ALPM-MTREE data (available through
value) fails, - appending files to a compressed or uncompressed package file fails,
- finishing a compressed or uncompressed package file fails,
- or creating a
Packagefails.
Auto Trait Implementations§
impl Freeze for PackageCreationConfig
impl RefUnwindSafe for PackageCreationConfig
impl Send for PackageCreationConfig
impl Sync for PackageCreationConfig
impl Unpin for PackageCreationConfig
impl UnwindSafe for PackageCreationConfig
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