pub struct Package {
pub service_name: ServiceName,
pub source: PackageSource,
pub output: PackageOutput,
pub only_for_targets: Option<TargetMap>,
pub setup_hint: Option<String>,
}Expand description
A single package.
Fields§
§service_name: ServiceNameThe name of the service name to be used on the target OS.
source: PackageSourceIdentifies from where the package originates.
For example, do we need to assemble it ourselves, or pull it from somewhere else?
output: PackageOutputIdentifies what the output of the package should be.
only_for_targets: Option<TargetMap>Identifies the targets for which the package should be included.
If ommitted, the package is assumed to be included for all targets.
setup_hint: Option<String>A human-readable string with suggestions for setup if packaging fails.
Implementations§
Source§impl Package
impl Package
Sourcepub fn get_output_path(
&self,
id: &PackageName,
output_directory: &Utf8Path,
) -> Utf8PathBuf
pub fn get_output_path( &self, id: &PackageName, output_directory: &Utf8Path, ) -> Utf8PathBuf
The path of a package once it is built.
Sourcepub fn get_output_path_for_service(
&self,
install_directory: &Utf8Path,
) -> Utf8PathBuf
pub fn get_output_path_for_service( &self, install_directory: &Utf8Path, ) -> Utf8PathBuf
The path of the service name with respect to the install directory.
Sourcepub fn get_stamped_output_path(
&self,
name: &PackageName,
output_directory: &Utf8Path,
) -> Utf8PathBuf
pub fn get_stamped_output_path( &self, name: &PackageName, output_directory: &Utf8Path, ) -> Utf8PathBuf
The path of a package after it has been “stamped” with a version.
Sourcepub fn get_output_file(&self, name: &PackageName) -> String
pub fn get_output_file(&self, name: &PackageName) -> String
The filename of a package once it is built.
pub fn get_output_file_for_service(&self) -> String
pub async fn create_for_target( &self, target: &TargetMap, name: &PackageName, output_directory: &Utf8Path, ) -> Result<File>
pub async fn create( &self, name: &PackageName, output_directory: &Utf8Path, build_config: &BuildConfig<'_>, ) -> Result<File>
pub async fn stamp( &self, name: &PackageName, output_directory: &Utf8Path, version: &Version, ) -> Result<Utf8PathBuf>
Sourcepub async fn create_with_progress_for_target(
&self,
progress: &impl Progress,
target: &TargetMap,
name: &PackageName,
output_directory: &Utf8Path,
) -> Result<File>
👎Deprecated: Use ‘Package::create’, which now takes a ‘BuildConfig’, and implements ‘Default’
pub async fn create_with_progress_for_target( &self, progress: &impl Progress, target: &TargetMap, name: &PackageName, output_directory: &Utf8Path, ) -> Result<File>
Identical to Self::create, but allows a caller to receive updates
about progress while constructing the package.