pub struct PackageBuilder { /* private fields */ }Expand description
Deterministic writer for the .aion ZIP container format.
Implementations§
Source§impl PackageBuilder
impl PackageBuilder
Sourcepub fn with_source<I, N, B>(
manifest: Manifest,
beams: BeamSet,
source: I,
) -> Self
pub fn with_source<I, N, B>( manifest: Manifest, beams: BeamSet, source: I, ) -> Self
Creates a builder with optional source files keyed by logical module name.
Sourcepub const fn with_explicit_timeout_identity(self) -> Self
pub const fn with_explicit_timeout_identity(self) -> Self
Includes the manifest workflow timeout in the package version identity.
Sourcepub fn finalise_manifest(&self) -> Result<Manifest, PackageError>
pub fn finalise_manifest(&self) -> Result<Manifest, PackageError>
Returns the manifest after stamping the authoritative beam content hash.
§Errors
Returns PackageError::MissingEntryModule when the manifest entry module
is not present in the supplied beam set.
Sourcepub fn write_to_bytes(&self) -> Result<Vec<u8>, PackageError>
pub fn write_to_bytes(&self) -> Result<Vec<u8>, PackageError>
Writes a deterministic .aion archive into memory.
§Errors
Returns PackageError variants for missing entry modules, manifest JSON
serialisation failures, ZIP writer failures, or target I/O failures.
Sourcepub fn write_to_path(&self, path: impl AsRef<Path>) -> Result<(), PackageError>
pub fn write_to_path(&self, path: impl AsRef<Path>) -> Result<(), PackageError>
Writes a deterministic .aion archive to the supplied filesystem path.
§Errors
Returns PackageError variants for missing entry modules, manifest JSON
serialisation failures, ZIP writer failures, or target I/O failures.
Trait Implementations§
Source§impl Clone for PackageBuilder
impl Clone for PackageBuilder
Source§fn clone(&self) -> PackageBuilder
fn clone(&self) -> PackageBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more