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
pub fn new() -> Self
pub fn is_empty(&self) -> bool
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).
Trait Implementations§
Source§impl Default for BundleWriter
impl Default for BundleWriter
Source§fn default() -> BundleWriter
fn default() -> BundleWriter
Returns the “default value” for a type. Read more
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>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
Converts
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>
Converts
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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.