pub struct DataPart {
pub data: Value,
pub metadata: BTreeMap<String, Value>,
}Expand description
A structured data part. Wire form:
{ "data": {...}, "metadata"?: {...} }.
Fields§
§data: ValueThe data. The shape is whatever the sending side and the receiving side agree on; the spec does not fix it. A consumer who wants a typed shape deserialises this into their own type.
metadata: BTreeMap<String, Value>Per-part metadata. Same shape and
rationale as Message::metadata.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DataPart
impl<'de> Deserialize<'de> for DataPart
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 DataPart
impl StructuralPartialEq for DataPart
Auto Trait Implementations§
impl Freeze for DataPart
impl RefUnwindSafe for DataPart
impl Send for DataPart
impl Sync for DataPart
impl Unpin for DataPart
impl UnsafeUnpin for DataPart
impl UnwindSafe for DataPart
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