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 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
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PackageBuilder
impl RefUnwindSafe for PackageBuilder
impl Send for PackageBuilder
impl Sync for PackageBuilder
impl Unpin for PackageBuilder
impl UnsafeUnpin for PackageBuilder
impl UnwindSafe for PackageBuilder
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