pub enum Part {
Text {
text: String,
metadata: Option<HashMap<String, Value>>,
},
File {
file: FileContent,
metadata: Option<HashMap<String, Value>>,
},
Data {
data: Value,
metadata: Option<HashMap<String, Value>>,
},
}Expand description
A discriminated union representing a part of a message or artifact.
Variants§
Text
Represents a text segment.
Fields
File
Represents a file segment.
Fields
§
file: FileContentThe file content, represented as either a URI or as base64-encoded bytes.
Data
Represents a structured data segment (e.g., JSON).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Part
impl<'de> Deserialize<'de> for Part
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 StructuralPartialEq for Part
Auto Trait Implementations§
impl Freeze for Part
impl RefUnwindSafe for Part
impl Send for Part
impl Sync for Part
impl Unpin for Part
impl UnwindSafe for Part
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