pub struct Bundle {
pub bundle_id: String,
pub bundle_kind: String,
pub description: String,
pub members: Vec<BundleMember>,
}Expand description
Composite engram payload. Carries a list of typed memory references under a shared envelope.
Fields§
§bundle_id: StringHuman-readable id. Diagnostics-only; identity comes from the engram’s content hash.
bundle_kind: StringDomain category (e.g. "model", "moot-snapshot",
"search-index"). Free-form; consumers route on it.
description: String§members: Vec<BundleMember>Implementations§
Source§impl Bundle
impl Bundle
Sourcepub fn member(&self, kind: &str) -> Option<&BundleMember>
pub fn member(&self, kind: &str) -> Option<&BundleMember>
Find a single member by kind. Returns None if no member has
the requested kind; the first match if multiple.
Sourcepub fn required_members(&self) -> impl Iterator<Item = &BundleMember>
pub fn required_members(&self) -> impl Iterator<Item = &BundleMember>
Iterate the member references the bundle declares as required.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Bundle
impl<'de> Deserialize<'de> for Bundle
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Bundle
impl StructuralPartialEq for Bundle
Source§impl TypedPayload for Bundle
impl TypedPayload for Bundle
Source§fn schema_ref() -> SchemaRef
fn schema_ref() -> SchemaRef
Content-addressed reference to the schema this type conforms to.
In practice this is typically a
const fn-computed SchemaRef or a
lazily-computed one keyed by the schema engram’s known content hash.Source§fn serialize_to_bytes(&self) -> Result<Vec<u8>>
fn serialize_to_bytes(&self) -> Result<Vec<u8>>
Serialize the value to bytes. Default implementation uses
serde_json; impls override to pick a per-schema serializer.Source§fn deserialize_from_bytes(bytes: &[u8]) -> Result<Self>
fn deserialize_from_bytes(bytes: &[u8]) -> Result<Self>
Deserialize bytes into a value. Default uses
serde_json.Auto Trait Implementations§
impl Freeze for Bundle
impl RefUnwindSafe for Bundle
impl Send for Bundle
impl Sync for Bundle
impl Unpin for Bundle
impl UnsafeUnpin for Bundle
impl UnwindSafe for Bundle
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