pub struct BundleWriter { /* private fields */ }Expand description
Accumulates intact files and serialises them into a .hmc bundle.
Files are stored verbatim — no compression, no transformation — each
page-aligned so the interior alignment (and thus zero-copy segment access)
of embedded .q42 / .p64 / .10d files is preserved. Entry order in the
index follows insertion order (deterministic bundles for a given input).
Implementations§
Source§impl BundleWriter
impl BundleWriter
Sourcepub fn with_page_align_4096(self, enabled: bool) -> Self
pub fn with_page_align_4096(self, enabled: bool) -> Self
Configure whether entries and index footer are aligned to 4096-byte page boundaries.
Sourcepub fn set_page_align_4096(&mut self, enabled: bool)
pub fn set_page_align_4096(&mut self, enabled: bool)
Set whether entries and index footer are aligned to 4096-byte page boundaries.
Sourcepub fn is_page_align_4096(&self) -> bool
pub fn is_page_align_4096(&self) -> bool
Whether 4096-byte page alignment is enabled.
Sourcepub fn add_file(
&mut self,
key: impl Into<String>,
kind: impl Into<String>,
bytes: Vec<u8>,
meta: Option<Vec<u8>>,
) -> Result<&mut Self, BundleError>
pub fn add_file( &mut self, key: impl Into<String>, kind: impl Into<String>, bytes: Vec<u8>, meta: Option<Vec<u8>>, ) -> Result<&mut Self, BundleError>
Add one intact file. key must be unique and non-empty. kind names the
embedded format ("10d", "q42", "p64", "manifest", …). meta is an
optional opaque per-entry CBOR blob (domain-specific).
Sourcepub fn add_family_manifest(
&mut self,
manifest: &TwinFamilyManifest,
) -> Result<&mut Self, BundleError>
pub fn add_family_manifest( &mut self, manifest: &TwinFamilyManifest, ) -> Result<&mut Self, BundleError>
Add a digital twin model family manifest describing variants, sexual dimorphism, life stages, and LOD hierarchy to the bundle.
Sourcepub fn add_cbor_ld_manifest(
&mut self,
manifest: &CborLdManifest,
) -> Result<&mut Self, BundleError>
pub fn add_cbor_ld_manifest( &mut self, manifest: &CborLdManifest, ) -> Result<&mut Self, BundleError>
Add a W3C Verifiable Credential manifest encoded as CBOR-LD.
Sourcepub fn add_species_meta(
&mut self,
meta: &HolisticSpeciesMeta,
) -> Result<&mut Self, BundleError>
pub fn add_species_meta( &mut self, meta: &HolisticSpeciesMeta, ) -> Result<&mut Self, BundleError>
Add holistic species metadata (flora, fauna, or mechanical assembly) to the bundle.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BundleWriter
impl RefUnwindSafe for BundleWriter
impl Send for BundleWriter
impl Sync for BundleWriter
impl Unpin for BundleWriter
impl UnsafeUnpin for BundleWriter
impl UnwindSafe for BundleWriter
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more