Struct omicron_zone_package::package::Package
source · [−]pub struct Package {
pub service_name: String,
pub blobs: Option<Vec<PathBuf>>,
pub rust: Option<RustPackage>,
pub paths: Vec<MappedPath>,
pub zone: bool,
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.
blobs: Option<Vec<PathBuf>>A list of blobs from the Omicron build S3 bucket which should be placed within this package.
rust: Option<RustPackage>Configuration for packages containing Rust binaries.
paths: Vec<MappedPath>A set of mapped paths which appear within the archive.
zone: boolIdentifies if the package should be packaged into a zone image.
setup_hint: Option<String>A human-readable string with suggestions for setup if packaging fails.
Implementations
sourceimpl Package
impl Package
pub fn get_output_path(&self, output_directory: &Path) -> PathBuf
sourcepub async fn create(&self, output_directory: &Path) -> Result<File>
pub async fn create(&self, output_directory: &Path) -> Result<File>
Constructs the package file in the output directory.
sourcepub fn get_total_work(&self) -> u64
pub fn get_total_work(&self) -> u64
Returns the “total number of things to be done” when constructing a package.
This is intentionally vaguely defined, but it intended to
be a rough indication of progress when using Self::create_with_progress.
sourcepub async fn create_with_progress(
&self,
progress: &impl Progress,
output_directory: &Path
) -> Result<File>
pub async fn create_with_progress(
&self,
progress: &impl Progress,
output_directory: &Path
) -> Result<File>
Identical to Self::create, but allows a caller to receive updates
about progress while constructing the package.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Package
impl<'de> Deserialize<'de> for Package
sourcefn 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
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more