pub struct GlobalMetadata {
pub version: u16,
pub base: Vec<BTreeMap<String, Value>>,
pub reserved: BTreeMap<String, Value>,
pub extra: BTreeMap<String, Value>,
}Expand description
Global message metadata (carried in header/footer metadata frames).
The metadata frame CBOR has three named sections plus version:
base: per-object metadata array — one entry per data object, each entry holds ALL structured metadata for that object independently. The encoder auto-populates_reserved_.tensor(ndim/shape/strides/dtype) in each entry._reserved_: library internals (provenance: encoder info, time, uuid). Client code can read but MUST NOT write — the encoder validates this._extra_: client-writable catch-all for ad-hoc message-level annotations.
Unknown CBOR keys at the top level are silently ignored on decode.
Fields§
§version: u16§base: Vec<BTreeMap<String, Value>>Per-object metadata array. Each entry holds ALL structured metadata for that data object. Entries are independent — no tracking of what is common across objects.
The encoder auto-populates _reserved_.tensor (with ndim, shape,
strides, dtype) in each entry. Application code may pre-populate
additional keys (e.g. "mars": {…}) before encoding; the encoder
preserves them.
reserved: BTreeMap<String, Value>Library internals — provenance info (encoder, time, uuid). Client code can read but MUST NOT write; the encoder overwrites this.
extra: BTreeMap<String, Value>Client-writable catch-all for ad-hoc message-level annotations.
Trait Implementations§
Source§impl Clone for GlobalMetadata
impl Clone for GlobalMetadata
Source§fn clone(&self) -> GlobalMetadata
fn clone(&self) -> GlobalMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GlobalMetadata
impl Debug for GlobalMetadata
Source§impl Default for GlobalMetadata
impl Default for GlobalMetadata
Source§fn default() -> GlobalMetadata
fn default() -> GlobalMetadata
Source§impl<'de> Deserialize<'de> for GlobalMetadata
impl<'de> Deserialize<'de> for GlobalMetadata
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GlobalMetadata, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GlobalMetadata, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for GlobalMetadata
impl Serialize for GlobalMetadata
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for GlobalMetadata
impl RefUnwindSafe for GlobalMetadata
impl Send for GlobalMetadata
impl Sync for GlobalMetadata
impl Unpin for GlobalMetadata
impl UnsafeUnpin for GlobalMetadata
impl UnwindSafe for GlobalMetadata
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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