pub struct BundleManifest {
pub schema_version: u32,
pub name: String,
pub runtime: BundleRuntime,
pub content: BTreeMap<String, BundleHash>,
}Expand description
The parsed manifest.toml at a bundle’s root — the bundle’s identity plus
the per-file content map that makes it content-addressed.
Fields§
§schema_version: u32Wire-format version. Always SCHEMA_VERSION today.
name: StringHuman-readable bundle name, e.g. "yah-marketing". Not part of the
content-address surface beyond the digest — two bundles with the same
bytes but different names have different digests.
runtime: BundleRuntimeRuntime selection ("self" / "mesofact/<ver>").
content: BTreeMap<String, BundleHash>Every file the bundle carries, keyed by its path within the bundle
(e.g. "app/dist/index.html", "bins/x86_64-unknown-linux-musl/serve")
mapped to its BLAKE3 content hash. Sorted (BTreeMap) so the manifest
serialization — and therefore the digest — is deterministic.
Implementations§
Source§impl BundleManifest
impl BundleManifest
Sourcepub fn from_toml_str(s: &str) -> Result<Self, BundleError>
pub fn from_toml_str(s: &str) -> Result<Self, BundleError>
Parse a manifest.toml string, rejecting an unknown schema version.
Sourcepub fn to_toml_string(&self) -> Result<String, BundleError>
pub fn to_toml_string(&self) -> Result<String, BundleError>
Serialize back to manifest.toml form.
Sourcepub fn digest(&self) -> BundleHash
pub fn digest(&self) -> BundleHash
The bundle’s content-address: a BLAKE3 digest over the manifest’s identity + content map.
Computed over a canonical, order-stable byte encoding (not the TOML text,
which whitespace/comments could perturb): schema_version, name, the
runtime wire string, then every (path, hash) pair in sorted path order.
Any change to any file’s bytes (its hash), the name, the runtime, or the
file set flips the digest — that immutability is what makes rollback a
pointer flip and eviction a no-invalidation affair (W272 §1).
Trait Implementations§
Source§impl Clone for BundleManifest
impl Clone for BundleManifest
Source§fn clone(&self) -> BundleManifest
fn clone(&self) -> BundleManifest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BundleManifest
impl Debug for BundleManifest
Source§impl<'de> Deserialize<'de> for BundleManifest
impl<'de> Deserialize<'de> for BundleManifest
Source§fn 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>,
impl Eq for BundleManifest
Source§impl PartialEq for BundleManifest
impl PartialEq for BundleManifest
Source§impl Serialize for BundleManifest
impl Serialize for BundleManifest
impl StructuralPartialEq for BundleManifest
Auto Trait Implementations§
impl Freeze for BundleManifest
impl RefUnwindSafe for BundleManifest
impl Send for BundleManifest
impl Sync for BundleManifest
impl Unpin for BundleManifest
impl UnsafeUnpin for BundleManifest
impl UnwindSafe for BundleManifest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.