Struct omicron_zone_package::package::Package
source · pub struct Package {
pub service_name: String,
pub source: PackageSource,
pub output: PackageOutput,
pub only_for_targets: Option<BTreeMap<String, String>>,
pub setup_hint: Option<String>,
}Expand description
A single package.
Fields§
§service_name: StringThe 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<BTreeMap<String, String>>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,
name: &str,
output_directory: &Utf8Path
) -> Utf8PathBuf
pub fn get_output_path( &self, name: &str, output_directory: &Utf8Path ) -> Utf8PathBuf
The path of a package once it is built.
sourcepub fn get_stamped_output_path(
&self,
name: &str,
output_directory: &Utf8Path
) -> Utf8PathBuf
pub fn get_stamped_output_path( &self, name: &str, output_directory: &Utf8Path ) -> Utf8PathBuf
The path of a package after it has been “stamped” with a version.
sourcepub fn get_output_file(&self, name: &str) -> String
pub fn get_output_file(&self, name: &str) -> String
The filename of a package once it is built.
pub async fn create_for_target( &self, target: &Target, name: &str, output_directory: &Utf8Path ) -> Result<File>
👎Deprecated: Use ‘Package::create’, which now takes a ‘BuildConfig’, and implements ‘Default’
pub async fn create( &self, name: &str, output_directory: &Utf8Path, build_config: &BuildConfig<'_> ) -> Result<File>
pub async fn stamp( &self, name: &str, output_directory: &Utf8Path, version: &Version ) -> Result<Utf8PathBuf>
sourcepub async fn create_with_progress_for_target(
&self,
progress: &impl Progress,
target: &Target,
name: &str,
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: &Target, name: &str, output_directory: &Utf8Path ) -> Result<File>
Identical to Self::create, but allows a caller to receive updates
about progress while constructing the package.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Package
impl<'de> Deserialize<'de> for Package
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 PartialEq for Package
impl PartialEq for Package
impl StructuralPartialEq for Package
Auto Trait Implementations§
impl RefUnwindSafe for Package
impl Send for Package
impl Sync for Package
impl Unpin for Package
impl UnwindSafe for Package
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